Master Balls are the best Poke Balls in existence, being the only ones that guarantee a capture. Of course, with that type of power, it's not surprising that most Mainstream Pokemon Games see trainers only being able to obtain one during their adventures. In Pokemon Sword & Shield, this is no different. However, unlike previous Pokemon Games, players actually won't obtain it during the Main Story. Instead, Magnolia will give it to your trainer during the Post Game. Outside of this Master Ball, players have the very low chance of obtaining another one any time they participate in the Lottery at any Pokemon Center.
Since a player will really only obtain one Master Ball during their journey, it would be wise to use it on a Legendary Pokemon, the strongest Pokemon in all of existence. However, since players will capture Eternatus during the Main Story through a Max Raid Battle, that only levels the Cover Legend to use it on at the end of the Post Game. It isn't necessary to do this, but it makes capturing Zacian/Zamazenta (depending on what version you're playing) so much easier, especially since they will be at Level 70 (the highest of any Pokemon in The Galar Region).
We have questions and answers related to this topic which may also help you: