Everybody had good points here, I’m gonna add one more point here.
As developers, we want to DRY codes (Don’t Repeat Yourself), which is pretty self-explanatory. This is one of the big reasons why frameworks exists. As @JeremyLT told us, they handle the common tasks that devs encounters.
Most of the times it’s the tasks that we’re used to and is easy to do, but it takes a lot more code writing to do it over and over again. Let’s take the example React. You don’t have to worry about creating elements from scratch and give it attributes then append it to the root div. In React, all you have to do is handle your logic, your JSX and then let React handle the repeated common tasks that will otherwise take you longer. One of my examples is that it took me 2 months to build a website from scratch using VanillaJS, and it’s not even fully complete, while using Svelte (another JS framework), it only took me 2-3 weeks.
Frameworks are awesome, but remember, it’s purpose is to do common task that YOU KNOW HOW IT WORKS. So don’t accelerate yourself, try learning VanillaJS first, learn how things work, learn how hard it is to write the same code over and over, then learn frameworks. Then you can appreciate how useful they are and the fact that you already know how they work, it will help you do more than before.
Hope this helps understand more. Sorry for the long paragraphs. Hope you have a good day, and Happy Coding
!