“In early April 2024, online play and other functionality that uses online communication will end for Nintendo 3DS and Wii U software,” Nintendo said on its Support website.
“This also includes online co-operative play, internet rankings, and data distribution.”
“if an event occurs that would make it difficult to continue online services for Nintendo 3DS and Wii U software, we may have to discontinue services earlier than planned.”
As for Pokémon Bank
Pokémon Bank will still retain its online functionality (presumably since it’s still used by players and uses online connectivity as its central mechanic).
Edit: Official Announcement with Q&A: https://en-americas-support.nintendo.com/app/answers/detail/a_id/63227/~/announcement-of-discontinuation-of-online-services-for-nintendo-3ds-and-wii-u
Microsoft can keep it up because they own their CDN. They dont have to pay a 3rd party company for upkeep.