These instructions - https://developer.apple.com/help/account/provisioning-profiles/create-a-development-provisioning-profile/
XCode can get an app running on the test device, but it will expire (at a seemingly random interval) at some point between 12-24 hours after running the build. In one case it lasted for 3 days.
I notice in settings, no provisioning profile is being installed through this process and I suspect something is wrong here causing this to happen.
No matter how I try to install the profile manually, it will not work.
In my troubleshooting, I noticed that if I create a dummy (free) developer account, it works normally and the .mobileprovision is installed (visible in settings) and test apps work without issue (although they expire in 7 days).
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles