If the top card of your library changes while you're casting a spell, playing a land, or activating an ability, you can't look at the new top card until you finish doing so. This means that if you cast a spell from the top of your library, you can't look at the next card until you're done paying for that spell.
Galea, Kindler of Hope
You can look at the top card of your library whenever you want (with one restriction; see below), even if you don't have priority. This action doesn't use the stack. Knowing what that card is becomes part of the information you have access to, just like you can look at the cards in your hand.
You'll still pay all costs for the spell, including additional costs. You may also pay alternative costs if any are available.
Magic: The Gathering · ™ & © Wizards of the Coast · Illus. Johannes Voss
Card data via Scryfall. Rarix is fan-made; not endorsed by the rights holders.
