Updated:

1. Find a trial chamber

/locate structure minecraft:trial_chambers

Click the coordinates in chat to fill in a teleport command. Trial chambers are underground, so watch the Y level. See the locate command.

2. Place one (Java)

/place structure minecraft:trial_chambers

This reshapes the terrain around you, so use a test world (place command).

3. Give trial items

/give @s minecraft:trial_key 5
/give @s minecraft:ominous_trial_key 5
/give @s minecraft:heavy_core
/give @s minecraft:breeze_rod 16
/give @s minecraft:wind_charge 64
ItemIDUse
Trial keytrial_keyOpens a vault
Ominous trial keyominous_trial_keyOpens an ominous vault
Heavy coreheavy_coreMace ingredient
Breeze rodbreeze_rodMace and wind charge ingredient
Wind chargewind_chargeThrown burst of wind

4. Give a mace

/give @s minecraft:mace[enchantments={density:5,wind_burst:3,unbreaking:3}] 1

The mace hits hardest while you fall. Density adds to that, and Wind Burst launches you up after a hit.

5. Summon trial mobs

/summon breeze ~ ~ ~5
/summon bogged ~ ~ ~5

6. Start an ominous trial

/effect give @s minecraft:trial_omen 600 0

Approach a trial spawner with Trial Omen to trigger the harder ominous trial. In normal play, drink an Ominous Bottle and enter a trial chamber with Bad Omen; it turns into Trial Omen there.

/give @s minecraft:ominous_bottle[minecraft:ominous_bottle_amplifier=4]

The amplifier goes from 0 (Bad Omen I) to 4 (Bad Omen V). Entering a village with Bad Omen starts a raid instead (raid commands).

Troubleshooting

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.