When the end step begins, the active player does not immediately receive priority. Instead, the game first checks for any triggered abilities that triggered at the start of the end step (such as those that say 'at the beginning of the end step'). These triggers are put onto the stack before anyone receives priority. This is governed by CR 116.5 and CR 405.2.
Specifically, CR 116.5 states that each time a player would receive priority, the game first puts all triggered abilities that have triggered since the last time a player received priority onto the stack. Only after all such triggers are on the stack does the active player actually receive priority (CR 116.3).
So the sequence during the end step is: (1) end step begins, (2) triggered abilities that trigger 'at the beginning of the end step' go on the stack, (3) the active player receives priority and may cast spells or activate abilities. The active player never has a chance to pass priority 'before' those triggers appear — they are placed on the stack automatically before priority is ever granted.
For example: You control a Havoc Festival with an ability that triggers at the beginning of each end step. When the end step starts, that trigger is placed on the stack immediately. Only then does the active player receive priority — they cannot take any action before the trigger is already on the stack.
This means players cannot 'race' to do something before a beginning-of-end-step trigger appears; such triggers are always on the stack first, before anyone receives priority to act.
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.