Trading was much different pre-Pokémon XY. In Pokémon XY and succeeding games, you could trade Pokémon anywhere with the press of a button. However, before the existence of the Y-Comm and similar devices, trainers had to visit the Pokémon Center to communicate with other players.
Is the case true for the Diamond and Pearl remakes as well?
How to trade Pokémon in Brilliant Diamond and Shining Pearl
To trade Pokémon in Brilliant Diamond and Shining Pearl, you need to take the escalators in the nearest Pokémon Center. The one on the lower floor is the Global Club (network trade) and the one on the upper floor is the Local Club (local trade). Note that you need a Nintendo Switch Online Membership to trade in the Global Club.
In both locations, talk to the woman at the center. When she asks if you want to enter the Local/Global Room, choose Yes, with a Link Code. Much like in Pokémon Sword and Shield, you can generate any random code. The important part is that you and the people you’re trading with input the same string of numbers.
A single Union Room can accommodate multiple trainers, so you can choose to trade (or battle!) with a number of people.
After you've visited any of the two Union Rooms for the first time, the feature can be accessed anytime with the press of a Y button. You don't have to be in the Pokémon Center.
You can also use the Global Wonder Station (GWS) in Jubilife City. It's not available yet, but we'll update this guide once it is.
For more help with Pokémon Brilliant Diamond and Shining Pearl, we at Pro Game Guides have you covered.