Sam Kirk's ability resolves before the spell that caused it to trigger. It resolves even if that spell is countered or otherwise leaves the stack without resolving.

Artwork
Loading artwork…
Sam Kirk, Xenoanthropologist
Star Trek Commander · #49 · EN
Nonfoil—Foil—
Card rules
Whenever an opponent casts a creature spell, investigate. (Create a Clue token. It's an artifact with "2, Sacrifice this token: Draw a card.")
3/3
"Literally everything in xenoanthropology is new and exciting."
Rare · Illustrated by Charles Chaisson
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions