In the base game, you get one guaranteed Master Ball from Professor Magnolia in Postwick after you become Champion. If all 5 of the digits match an ID in the Loto-ID in Pokemon Centers, you can also win a Master Ball.
If you purchased the DLC, Peony will give you a Master Ball once you become Champion and clear your first Dynamax Adventure.
You can also trade Pokemon holding Master Balls, though the only people typically willing to do so are those shamelessly advertising whatever awful hacking service they have via blatantly edited Pokemon. The Master Balls are perfectly fine to use and won't mess up your game, though.