Time plays a vital role in Pokémon Sword and Shield because particular Pokémon only show up in regions based on conditions. For example, you will only find a Mimikuy when it is foggy. There are ways to change the weather, but several players have encountered the problem of not being able to make the weather appear foggy.
Spawning Mist weather is quite rare. The sure way to make the fog appear in the game is to beat the game. You have to progress to the end of the story. However, some players have reported encountering Mist previously. While it can rarely happen, Fog time starts to get a lot more common after beating the game.
You will know when you have beaten the game when you see the credit roll. This time does not occur when you get all the gym badges because there is still a lot for you to do.
After completing the story, you can tweak your Switch's time settings to make Fog show up more often reliably. You need to make sure you set your Switch's date to 6/1/2020 for it to appear.