Plenty of people exercise with their phone. The Belkin Smartphone Fitness Mount lets you easily attach your phone to your elliptical, treadmill, spin bike, and other gym surfaces. It is made for iPhone 12 and works with MagSafe cases up to 3mm thick. It has a ball joint to allow for 360-degree rotation.
This magnetic fitness mount ships with a strap for attaching it to virtually any exercise machine. You can find out more about it here.