MS didn't deprecate it, they can't. It is the core of Windows, from NT to Win11. They've hidden it behind ever increasing number of frameworks that obscure the at-the-bare-metal nature of the interface.
The only way to code a Windows app more "in the raw" is in assembly. Or directly in machine-code.
Frameworks are tools, designed to relieve the programmer from a lot of the burden of what is required to setup the interface of a WinApp. If you ever really look at the code for even the simplest Win compliant app you see a lot of start up code in WinMain, the starting point for every WinApp just as main is the starting point for every console app.
There are two and only two functions
required in every WinApp:
1. WinMain. There is one variation to that, wWinMain, that tells the compiler your app is gonna be Unicode and not ANSI.
2. WndProc. Window Procedure, the function that tells the app what to do and how to respond to messages sent to the app by the operating system. It is a callback function.
WndProc can be renamed to whatever you want, you could name the function SniggleFritz if you want. You tell the app the name of your WndProc when you set up the guts of your WinApp in WinMain.
Visual Studio has wizards, guided dialogs, that let a programmer select the type of app is being programmed. Whether it is a console app, Windows GUI app, a DLL or static lib.
I personally prefer to use only the "Windows Desktop Wizard" project type, where I can name the project and overall solution and determine what type of app I want to create. I ALWAYS select the additional option of "Empty Project" because the 'boiler-plate' code that VS poops out is rather bulky even for a simple console app. Lots and lots of comments as if I had never programmed before.
The boiler-plate code for a WinApp is quite a lot. It has a rudimentary menu, has a dialog that displays info about the app. Along with a couple of icons.
You mentioned something about deprecation earlier. The boiler-plate code VS provides uses deprecated Win32 functions to set up the app! LoadIcon and LoadCursor. It also uses generic versions of the Win32 functions to it theoretically can be compiled for Win9x/Me machines! A hybrid 16/32 bit OS. Every Windows version based on NT has been fully 32-bit.
LoadIcon is a generic name for two separate Win32 function the compiler chooses one or the other depending on if the app is compiled for ANSI or Unicode. LoadIconA/LoadIconW.
Petzold's book does a good job of explaining what makes a WinApp different from a console app. One thing to note is the book was written for Windows 98 and uses ANSI encoding. MS recommends to use Unicode. And NOT use Hungarian Notation.
Using a framework is useful if you don't want to be bothered with the nitty-gritty details of what makes your app work. Knowing what is happening "behind the curtain" a good programmer should have a passing understanding of what is hidden away behind all the fancy obscuro-net of a framework.
.NET and its variants do not create a true machine code WinApp, they create a byte-code file that requires a run-time interpreter to execute the code. Similar to Java.
If you create one of those apps and you share it with someone who's computer doesn't have the run-time interpreter installed the app doesn't run.