For XBox you can simply use the UWP-Project afaik.
But for all consoles the process usually is to apply as a developer there, then get accepted by Sony/Nintendo/Microsoft. After that you'll have to buy special developer-versions of the consoles (which are quite pricey).
When you got all that you'll get access to the APIs for the consoles.
That's the reason why most Indie-Titles are released for PC first and then ported to consoles.
Especially Nintendo (for the Switch) is really picky (I've heard). Basically applying is rather useless. If they want your game, they'll contact you. (But don't take my word for it, I might be completely wrong here)