https://kaeru.world/projects/wfc
Since the Nintendo DS online server and ceased operations many years ago, you can use private servers like Wiimmfi to be able to connect to a recreation of the online services.
How to connect to Kaeru WFC, a proxy to Wiimmfi:
Open Wi-Fi settings of your DS, DSi, 3DS or N3DS. Follow the instructions manual for how to do so for each console.
Change the configuration of your Wi-Fi network, or connect it right now.
In the configuration (or after connection, go into configuration now), deselect Auto-obtain DNS and write this address in Primary DNS:
178.62.43.212
And either one of these address in Secondary DNS:
1.1.1.1 (Cloudfare DNS) 8.8.8.8 (Google DNS)
(If you can suggest a more privacy respecting DNS address to use here, please do so!)
You can now connect to Nintendo Wi-Fi connection! Wiimmfi for Pokemon is working as a proxy to Poké Classic Network. Check out the website for information about your or other available GTS trades!