The triggered ability can trigger only once each turn. The ability will resolve before the second spell does. It doesn't matter if the first spell you cast that turn has resolved, was countered, or is still on the stack.

Artwork
Loading artwork…
Firja, Judge of Valor
Multiverse Legends · #105 · EN
Nonfoil—Foil—Etched—
Card rules
Flying, lifelink
Whenever you cast your second spell each turn, look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard.
2/4
She is both shepherd and reaper, and her judgment is final.
Uncommon · Illustrated by Livia Prima
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
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
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
The triggered ability triggers only if the creature that has it is on the battlefield as you cast your second spell. Spells you cast in a turn before that creature entered the battlefield will count. In other words, the ability won't trigger if the creature with the ability is the second spell you cast during a turn or if you have already cast two or more spells by the time that creature enters the battlefield that turn.