Java Edition:Bad Omen VI
Usually, the maximum level of Bad Omen is V (level 5), but there have been a couple of ways to obtain the Bad Omen VI (level 6).
Obtaining
Killing Raid Captains
From 19w13a (1.14 snapshot) through 20w17a (1.16 snapshot), killing 6 or more raid captains would give the player Bad Omen VI. This was later changed to a maximum of Bad Omen V[1], discontinuing all Bad Omen effects with a level of 6. This is a temporary discontinued feature, as the effect only lasts for 100 minutes, or until a village or trial chambers are entered.
23w13a_or_b Vote Rule
In April Fools' snapshot 23w13a_or_b, voting for the perma_effect
vote rule will give the player a random non-instant[2] effect from level 1 through 6. The random effect could be Bad Omen 2-6. You can also have Bad Omen 6 as a potion by first enabling the drink_air
vote rule, and then drinking a bottle of void when you have Bad Omen 6 applied.