When the upkeep step begins, any triggered abilities that trigger "at the beginning of your upkeep" trigger immediately and are placed on the stack before any player receives priority (CR 502.1, 503.1). The active player then receives priority with those triggers already on the stack.
So you cannot cast a spell before those triggered abilities are placed on the stack — they go on automatically. However, once those triggers are on the stack and priority is passed, you absolutely can cast spells and activate abilities in response to those triggers, before they resolve (CR 116.3, 509.1).
If you want to cast a spell before upkeep triggers exist on the stack, the only window is the end of the previous step (the untap step has no priority, so effectively the last chance is end of the previous turn's end step, or during your draw step after upkeep ends). You cannot squeeze a spell in before upkeep triggers during upkeep itself.
Example: You control Spreading Seas on an opponent's land, and you have a "at the beginning of your upkeep, draw a card" enchantment. When upkeep starts, the draw trigger goes on the stack. Your opponent cannot cast a removal spell to destroy the enchantment before the trigger is already on the stack — it's too late; the trigger has already been placed.
In summary: beginning-of-upkeep triggers go on the stack automatically when the step starts, before any player gets priority. You can respond to them once they're on the stack, but you cannot act before they're placed there (CR 502.1, 503.1, 116.3b).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.