The game checks whether it is legal to cast a spell before costs are determined or mana abilities are activated while casting it. If you no longer control a Desert after that point, perhaps because you sacrificed all of your Deserts while activating mana abilities, this won't affect whether you can legally cast Colossal Rattlewurm.

Artwork
Loading artwork…
Colossal Rattlewurm
Outlaws of Thunder Junction · #159 · EN
Nonfoil—Foil—
Card rules
Colossal Rattlewurm has flash as long as you control a Desert.
Trample
1
, Exile this card from your graveyard: Search your library for a Desert card, put it onto the battlefield tapped, then shuffle.
6/5
Rare · Illustrated by Filip Burburan
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
Standard Legal
Standard Brawl 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
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions