As with all Mainstream Pokemon Games, players can obtain what are known as Mystery Gifts by accessing the Mystery Gift Menu on the Main Menu while playing Pokemon Sword & Shield at any point in time. Mystery Gifts are usually distributed by the Pokemon Company as Wi-Fi Events, where certain Pokemon or special Items are given away during a window of time. One such Wi-Fi Event was for Gigantamax Meowth - where players would receive a free Meowth that has the ability to Gigantamax in battles that allow it - which was active at the launch on the games through the New Year 2020. Players can also obtain Mystery Gifts locally (like ones done by Gamestop and other stores), as well as via the Poke Ball Plus (in order to obtain Mew).
We have questions and answers related to this topic which may also help you: