There are numerous ways for you to capture certain Pokémon in Pokémon Go. The most traditional way is to encounter them while walking around and eventually evolving them into new forms. Some of these Pokémon only come out when it’s dark out or if the sun is shining. There are even some Pokémon you can encounter only in raid battles, such as the legendary Pokémon you have to fight in five-star raids. For Galarian Yamask, it looks there are not too many ways for you to encounter it.
From what we can tell from the Pokémon Go blog page, the only way to encounter Galarian Yamask is to participate in the Halloween 2020 special research, A Spooky Message Unmasked. This special research quest will be available on October 25 from 8 AM to 10 PM in your local time zone. There will be four tasks with this research, so if you don’t complete it then, it’s unlikely you will be able to catch it out in the wild. You have a little over 12 hours to complete it. For those who completed the Mega Buddy Challenge available in late September, you will also earn Mega Gengar energy for complete steps in the task.
Galarian Yamask will be a rare Pokémon, so make sure you finish up all of the special research steps before time runs out. After you capture it, if you want to evolve it into Runerigus, you need to collect 50 Yamask candy and then complete 10 raids. These can be any of the available raids in the game.