The triggered ability will resolve before the spell that caused it to trigger.
18-06-2021
wotc
The ability is independent from the spell that caused it to trigger. Notably, if the enchantment spell is countered or doesn't resolve for any other reason, you'll still draw a card (unless something specifically counters the triggered ability).
Random a card of Magic: The Gathering (MTG), but you can also roll the D20 dice, random a Planeswalker, have fun with the random rules and more.