To unlock legendary brawlers, you have only one possible way: open Brawl Boxes, Big Boxes, or Mega boxes. These boxes are available at the Trophy Road, by unlocking each season's free and Brawl Pass rewards, or by redeeming them for gems that can be purchased with real money to speed up the process.
Now, nothing guarantees that the boxes you open will drop one of these characters. In fact, according to numbers made by community players, one legendary brawler appears for every 435 boxes opened, but some voices are much more pessimistic. Some claim that you need to open 2000 boxes to be 99% sure of getting a legendary brawler.
One way to speed up the process is to unlock as many rare and ultra-rare brawlers as possible, but even so, the laws of probability behind the drop of the powerful legendary characters are too random to be able to ensure a result.
In addition to all this, it should be noted that Brawl Stars has a "lucky system". With this system, it is stated that if a new brawler does not appear every time we open a box, the chances of it doing so in successive boxes increase. There is no infallible (or legal) trick that will ensure that we get a legendary character.
We take this opportunity to remind you that this category of fighters, in addition to being very powerful, can make the experience of playing with their special skills much easier. They can be identified by the background color of their portrait, which is yellow.