To side-load an app on an iPhone you need to sign it with a developer certificate (and apple will actually do it for you). You can only run the app if you trust said certificate (you will get a prompt saying something like going in the settings, tapping on the developer name and then tapping "Trust". You would then need to confirm using your passcode/faceid/touchid). It's not like anyone can put apps on your phone and being able to launch them without any friction.