The check of whether the enchanted creature has three or more +1/+1 counters on it happens as part of the resolution of the attack triggered ability. If the third +1/+1 counter is put on the enchanted creature any other way, you won't sacrifice the Ordeal until the next time the creature attacks.

Artwork
Loading artwork…
Ordeal of Purphoros
Jumpstart 2022 · #577 · EN
Nonfoil—Foil—
Card rules
Enchant creature
Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice this Aura.
When you sacrifice this Aura, it deals 3 damage to any target.
Uncommon · Illustrated by Maciej Kuciara
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pioneer Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
The +1/+1 counter is put on the creature before blockers are declared and before combat damage is dealt.
If you sacrifice the Ordeal in some other way, its last ability will trigger.