You cannot play Super Smash Bros. Brawl online anymore. Nintendo Wi-Fi Connection (WFC) — the service handling friend codes, matchmaking, and spectating — was **permanently shut down on May 20, 2014**.
**No.** The "Nintendo Wi-Fi Connection Settings" channel on the Wii will error out (Error 20100/20110). You cannot generate a new friend code or connect to the defunct service.
Super Smash Bros. Ultimate (Switch) — Active online, rollback netcode (v13.0+), 80+ fighters, constant updates. Brawl online is a historical curiosity; Ultimate is the living game.
You can't retrieve it. The server that issued it is gone. Your old Wii might still *display* it in the Friend Roster (if you never formatted), but it's useless.