From Bulbapedia, the community-driven Pokémon encyclopedia.
A random encounter (Japanese: ！エンカウント ! encounter) is a type of wild Pokémon encounter found in the Galar region in Pokémon Sword and Shield. It is when an exclamation mark appears while the player is walking in the tall grass. Unlike symbol encounters, the Pokémon cannot be seen in the overworld until it is battled.
The player does not know what Pokémon will appear until they enter the encounter. Unlike previous generations, random encounters in Galar are only triggered in tall grass, and only when the player makes contact with the spot that the random encounter is indicated at.