You’ll still scry 1 even if Prison Realm’s first ability has no legal target or if that target becomes an illegal target before the ability resolves.

Artwork
Loading artwork…
Prison Realm
War of the Spark · #26 · EN
Nonfoil—Foil—
Card rules
When this enchantment enters, exile target creature or planeswalker an opponent controls until this enchantment leaves the battlefield.
When this enchantment enters, scry 1.
After millennia to craft victory, Bolas had eternity to contemplate defeat.
Uncommon · Illustrated by Daarken
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
Tlr 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
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If a token is exiled this way, it will cease to exist and won’t return to the battlefield.
If Prison Realm leaves the battlefield before its first triggered ability resolves, the target permanent won’t be exiled.
Auras attached to the exiled permanent will be put into their owners’ graveyards. Any Equipment will become unattached and remain on the battlefield. Any counters on the exiled permanent will cease to exist. When the card returns to the battlefield, it will be a new object with no connection to the card that was exiled.