The activated ability doesn’t target the creature the Equipment will be attached to. It may be attached to a creature with shroud, for example. You don’t choose which creature it will be attached to until you actually attach it. Once you choose which creature to attach it to, it’s too late for players to respond.

Artwork
Loading artwork…
Quest for the Holy Relic
The List · #ZEN-33 · EN
Nonfoil—Foil—
Card rules
Whenever you cast a creature spell, you may put a quest counter on this enchantment.
Remove five quest counters from this enchantment and sacrifice it: Search your library for an Equipment card, put it onto the battlefield, attach it to a creature you control, then shuffle.
Uncommon · Illustrated by Greg Staples
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
PreDH Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If you cast a creature spell, Quest for the Holy Relic’s triggered ability triggers and goes on the stack on top of it. The triggered ability will resolve before the spell does.
You may activate Quest for the Holy Relic’s activated ability even if you control no creatures, or you control no creatures that can be equipped. In that case, you’ll simply put the Equipment card you find onto the battlefield without attaching it to anything.