Galarian Yamask isn’t the only version of the Pokémon in Sword and Shield. The Pokémon’s Unova form and its original evolution, Cofagrigus, can be found in the new games.
There’s only one way to get these Pokémon, however, and it comes through trading with an NPC in-game. Without these Pokémon, you won’t be able to complete the Galar Pokédex.
First, you’ll need to catch a Galar Yamask and then head to Baloonle Stadium. There, you’ll find a young trainer wearing an Eevee costume in the left corner. They’ll ask for a Galar Yamask in return for a Unova one.
Once you acquire Unova Yamask, you can evolve it into a Cofagrigus by leveling it up to level 38. There’s no need for any silly tricks to get it—just level it up as normal and you’ll have a Cofagrigus sooner or later.
You can breed another Unova Yamask, however, by giving the parent an Everstoone. If you don’t, trying to breed it will result in the game just giving you constant Galar Yamasks from eggs instead, so use the one you have carefully.