The Master Ball is a one-of-a-kind Poké Ball Pokémon Sword and Shield. When you cast it, you will have a 100% chance of catching any Pokémon you hit with it. It is exceptionally rare, and due to the fact that it always catches a Pokémon, trainers seek it out to ensure they can always get the rarest encounters.
To get it into Pokémon Sword and Shield, you need to make your way through the entire game. You don't have to beat the game by simply acquiring all eight gym badges. Defeat it by going through and facing Battle Tower where you have to face Leon, the useful Pokémon champion you have seen throughout history. Challenge him, win and enter the Hall of Fame.
After that, you return to your hometown and return to your home. Eventually, Professor Magnolia should come to your house and she will want to talk to you. She congratulates you on your success in completing the Battle Tower and becoming the new Pokémon champion.
He will deliver the Master Ball to you shortly after. Because you have to go home at the end of the game and talk to her, you can't lose him.
You can get another Master Ball by winning it via Loto-ID. You can earn a Master Ball after matching five or more numbers through the ID system. To make sure you never miss a chance to win the Lotus-ID, go back to the computer in the Pokémon Center to see if you won that day. To increase the odds of winning, go out there and catch all the Pokémon you can encounter.