All Apple operating systems carry a good tradition of arranging modal alert buttons. Dismiss button goes to the near leading edge and the default action button at the trailing edge. Look it up at HIG.

However, Apple often breaks their own rules. In iOS I keep interacting with alerts where a primary button is on the left. I noticed it more with the iOS 16 beta. Usually, when this happens both buttons have the same font weight, which means that a developer didn’t specify any of the buttons as a “default” action. If they would, it would go in the right spot. I keep filing reports and I encourage you to do the same.

A modal alert, would you like to restart your iPhone now, with restart option on the left edge

If the alert is very important, disable the default button for a couple of seconds, to make sure the default option is not pressed without reading. Put the delay on every third-party tracking confirmation, and you will see even more people opting out.

Arranging is important because it works on a muscle memory level. Even my daughter which can’t read yet, when using iPad apps is trained to tap the default button on the right edge.