If the triggered ability does trigger, that ability will check Ayara's Oathsworn again as it tries to resolve. If Ayara's Oathsworn has four or more +1/+1 counters on it at that time, the ability won't resolve. None of its effects will happen. You won't put a +1/+1 counter on Ayara's Oathsworn and you won't search for a card.

Artwork
Loading artwork…
Ayara's Oathsworn
March of the Machine: The Aftermath · #111 · EN
Nonfoil—Foil—Etched—
Card rules
Menace
Whenever this creature deals combat damage to a player, if it has fewer than four +1/+1 counters on it, put a +1/+1 counter on it. Then if it has exactly four +1/+1 counters on it, search your library for a card, put it into your hand, then shuffle.
2/2
Rare · Illustrated by Johann Bodin
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny 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
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
If Ayara's Oathsworn has four or more +1/+1 counters on it as it deals combat damage to a player, its ability won't trigger at all. None of its effects will happen. You won't put a +1/+1 counter on Ayara's Oathsworn and you won't search for a card.
If Ayara's Oathsworn isn't on the battlefield as its ability tries to resolve, you won't search for a card, even if Ayara's Oathsworn had three +1/+1 counters on it before if left the battlefield, because it won't be around to have the fourth +1/+1 counter put on it.