An ability that triggers "whenever you surveil" triggers after you're done surveilling, even if you have fewer cards in your library than the number of cards you're instructed to surveil. It even triggers if you have no cards in your library.

Artwork
Loading artwork…
Mirko, Obsessive Theorist
Murders at Karlov Manor Commander · #50 · EN
Nonfoil—Foil—Etched—
Card rules
Flying, vigilance
Whenever you surveil, put a +1/+1 counter on Mirko.
At the beginning of your end step, you may return target creature card with power less than Mirko's from your graveyard to the battlefield with a finality counter on it. (If it would die, exile it instead.)
1/3
Mythic · Illustrated by Heonhwa
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Tlr 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
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Multiple finality counters on a single permanent are redundant.
Finality counters work on any permanent, not only creatures. If a permanent with a finality counter on it would go to a graveyard from the battlefield, exile it instead.
Finality counters don't stop permanents from going to zones other than the graveyard from the battlefield. For example, if a permanent with a finality counter on it would be put into its owner's hand from the battlefield, it does so normally.
Finality counters aren't keyword counters, and a finality counter doesn't give any abilities to the permanent it's on. If that permanent loses its abilities and then would go to a graveyard, it will still be exiled instead.