Use iPhone Mirroring While Using Hotspot
Currently, if you try to use iPhone Mirroring on your Mac while connected to your iPhone’s Hotspot, you won’t be able to connect.
Fortunately, this changes with iOS 18.2, allowing you to use iPhone Mirroring while using Hotspot.