Depends on the airline. Majority have a 12 month gap until you can apply again, should you fail. Some even have 6 months.
The number of times you fail an assessment doesn’t really matter. I know people who’ve went to big UK based airlines who got in on 3rd or 4th attempt. So it’s definitely not a case of if you fail once, that’s you blacklisted.
To some airlines, applying again stands you in good stead (as it shows a true desire to work for the company), but for others not so much so (you know the assessment, interview, group tasks, and sim profile, so you can prepare ahead and possibly have an unfair advantage).
But generally speaking, it’s not uncommon for people to apply several times to get into “better” airlines.