|If you learn something for the intention of making yourself an income, then the Win32 API is not the right choice in the year 2025. On the other hand ...
I learned Windows programming before there was a WIN32 API, it was way back in the 16-bit days of the "WIN16 API" (it was never called that). My primary learning was not an API, but event driven programming: Taking your data structures from one consistent state to another consistent state in well defined, atomic steps. Always leaving your data so that it can be properly used by anyone else the next time something happens. No loose ends, no garbage on the floor. Looking upon each event cycle similar to a database transaction. A great philosophy for building robust software.
Often, programmers show me code: 'See, I am doing event driven programming too - here is the switch case on the input value!' But even driven is so much more than a switch statement. What I see is a lot of other logic that is not at all related to the state and event, lots of loose ends, lots of garbage variables affecting the state without being treated as state data. The Windows model put a strong pressure on you to do 'clean' event driven coding.
Today, working in C#, I still think in event/state terms, taking data structures through well defined, finite processing steps from on consistent state to another. I didn't learn that from any book published this millennium. I didn't learn it from younger coworkers. I didn't learn it from browsing programming forums on the Internet. I learned it from the Windows API.
I am really happy to have that background when programming in the year 2022, with the tools of year 2022. Learning the Windows API / event driven programming was certainly no waste of time. It has great value for me, even today.