Frontend dev gets a lot of traffic in software development online communities where new developers are just getting started. That’s understandable, since if you have a computer with a web browser, you only need a text editor of some kind and you’ve got all you need to start writing and running code. It’s arguably the most accessible area of software development to get started with.
The fact is though that the majority of software development is not web dev, and most is not even backend apis to support frontend apps either. If you think about the electronic devices that fill our lives nowadays, our phones, tablets, watches, laptops, even household appliances like clothes washers, microwave ovens, all these devices run software. Modern cars have multiple systems that are comprised of millions of lines code. And this is not even thinking about the business systems that are behind the curtain and invisible to most people, financial and accounting systems, payroll processing, all quietly running 24/7
There is no golden rule that says you should start your career by learning frontend dev first and then moving into other areas. Pursue what is interesting to you. Over their careers some developers may move back and forth between roles, some may only ever work on backemd dev and never write a line of HTML Find what interests you and go for it!