Go to your email and search this: [Pokémon swsh Expansion Pass] — Here's your code!
Change "swsh" to whichever version you got (capitalize the first letter). If you can't find it, look in the spam/trash folder (hopefully it wasn't deleted). If you still can't find it, see what email is registered to the Nintendo account you purchased the DLC with so you know you're looking in the right inbox. If you can't find it still, then idk, contact Nintendo/The Pokémon Company.