“Ready Golf”. In stroke play, you are both allowed and encouraged to play out of turn in a safe and responsible way, such as when:
You agree with another player to do so for convenience or to save time,
Your ball comes to rest a very short distance from the hole and you wish to hole out, or
You are ready and able to play before another player whose turn it is to play under the normal order of play, so long as in playing out of turn you do not endanger, distract or interfere with any other player.
But if the player whose turn it is to play is ready and able to play and indicates that they want to play first, you should generally wait until that player has played.