If Doom Foretold leaves the battlefield or changes control while its ability is on the stack, its effect still happens. You just won't be able to sacrifice it if instructed to do so.

Artwork
Loading artwork…
Doom Foretold
Throne of Eldraine · #187 · EN
Nonfoil—Foil—
Card rules
At the beginning of each player's upkeep, that player sacrifices a nonland, nontoken permanent of their choice. If that player can't, they discard a card, they lose 2 life, you draw a card, you gain 2 life, you create a 2/2 white Knight creature token with vigilance, then you sacrifice this enchantment.
In the end, death usually has its way.
Rare · Illustrated by Daniel Ljunggren
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander 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
If the player can sacrifice a nonland, nontoken permanent, that player must do so. They can't choose to rush toward their doom.
During your upkeep, you can sacrifice Doom Foretold for its own ability.
If the player is unable to sacrifice a permanent and is unable to discard a card, they still lose 2 life, and the rest of Doom Foretold's effects happen.
In a Two-Headed Giant game, Doom Foretold's ability triggers twice during a team's upkeep. In any order you'd like, each of those players has to sacrifice a permanent. The full consequences happen if that player can't, even if you sacrifice Doom Foretold as the first triggered ability is resolving.