Rashmi's ability resolves before the spell that caused it to trigger. If you cast a spell using the ability, it will also resolve before the initial spell.

Artwork
Loading artwork…
Rashmi, Eternities Crafter
Duskmourn: House of Horror Commander · #231 · EN
Nonfoil—Foil—
Card rules
Whenever you cast your first spell each turn, reveal the top card of your library. You may cast it without paying its mana cost if it's a spell with lesser mana value. If you don't cast it, put it into your hand.
2/3
Mythic · Illustrated by Magali Villeneuve
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 revealed card is a land card, you put it into your hand.
If the card has X in its mana cost, you must choose 0 as the value of X when casting it without paying its mana cost.
Rashmi has to be on the battlefield at the moment you cast your first spell. If that spell is Rashmi itself, Rashmi's ability can't trigger. If that spell causes Rashmi to leave the battlefield as an additional cost to cast it, Rashmi's ability can't trigger.
Rashmi's ability triggers when you cast your first spell each turn, not just on your turn.
If you cast the top card of your library, you do so as part of the resolution of Rashmi's ability. You can't wait to cast it later in the turn. Timing permissions based on the card's type are ignored, but other restrictions (such as "Cast [this card] only during combat") are not.
If Rashmi's ability resolves and the spell that caused it to trigger has been countered, use that spell's mana value as it last existed on the stack to determine whether or not you may cast the top card of your library.
For spells with X in their mana costs, use the value chosen for X to determine the spell's mana value. For cards in your library with X in their mana costs, X is considered to be 0.
If you cast a card "without paying its mana cost," you can't choose to cast it for any alternative costs, such as emerge costs. You can, however, pay additional costs. If the card has any mandatory additional costs, such as that of Cathartic Reunion, those must be paid to cast the card.