Simultaneous Effects
Source: Player’s Handbook (2024) p. 374. Available in the SRD and the Free Rules (2024)
If two or more things happen at the same time on a turn, the person at the game table—player or DM whose turn it is decides the order in which those things happen. For example, if two effects occur at the start of a player character’s turn, the player decides which of the effects happens first.