There's a lot of ways to learn anything, but I would say that the first step is pursuing a variety of subjects that you find interesting, and even some you think are boring. A lot of seemingly boring things I've found turn out to be quite fascinating when it comes down to it. (e.g. database design)
Over time, you will pick things up, and put them back down. You will return to some, and stay away from others, but eventually you will build a repertoire of knowledge and experience in a variety of different fields. I would also bet that at least one subject will interest you so much that you keep coming back and in which you will ultimately develop expertise.
Experimentation is the name of the game!
I see just dabbling in whatever interests and experimenting with them takes one forward.
What you wrote is profoundly impactful.
Among the things that aren't common knowledge among basement programmers: network configuration (VPCs, load balancing, CDNs, security), security/IAM, non-relational datastores, ML model development & training, and the list goes on and on and on (microservices & containers, devops, serverless, advanced logging/monitoring & problem solving, high availability, HPC/grid, blockchain, and oh so much more.
The point I'm trying to make is that you can become a T shaped programmer by continuing to study and learn various programming skills, but you may want to alternatively consider becoming broad in ways that expand your value beyond just coding.
Trivial example: at some point around age 17 I installed Gentoo successfully and learned a lot about gnu/linux (and some bsd) in the process. Lots of little skills formed and connected, and they continue connecting with other things to this day. Got my initial hook on vim then. Saw how nicely colorized my terminal prompt was and that opened the door to many bash customizations. One of the skills I had to learn was to understand how hard drives worked (at least to the ability to successfully partition, format, and boot them -- I did accidentally wipe a windows xp partition the first time). Some years later (age 20?) I had accidentally rm'd a couple weeks of java work without having committed it yet. But prior knowledge of the system let me know the data was still there, and I was able to recover it by scanning the disk device partition directly for the bytes. (Ended up using "grope.tcl" referenced here http://wiki.yak.net/592 which was a lot more efficient than what I was making.)
I once tried upgrading my Windows laptop while having very less space in C drive. Windows totally crashed. After that I used live bootable Ubuntu, but would still like to retrieve all of my windows data.
Do you know how can I do that?