What affects the chance
- The target's remaining HP: keep it low without fainting it.
- The Poké Ball: a Great Ball is better than a Poké Ball, and an Ultra Ball is better than a Great Ball.
- Status conditions: sleep and freeze help more than paralysis, poison or burn.
Example from the thread
For legendaries like the Regis, the Galarian birds, Calyrex and the Swords of Justice, the thread uses a catch rate of 3. With an Ultra Ball, full HP and no status, the standard formula gives about a 2.6% chance per ball. Sleep or freeze raises that to about 5.2%, and paralysis, poison or burn to about 3.6%. Lowering HP raises these numbers further.
Better Balls
The thread points to Timer Balls, which get better the more turns have passed in a battle.
Check a current catch-rate guide for exact figures, as the real formula has more steps.