Many UI libraries allow us to implement accordion and other simple components. But do you need these libraries?
They give you less flexibility and will increase the bundle size of your application.
Create components from scratch such as accordions, modals, tabs, dropdowns, etc. is the way for your projects.
Create a reusable accordion component