Hello, this is not a permanent solution. I've done this 3 weeks ago and have had to do the same today because the same issue cropped up again. This was my answer in another thread I cant find :
Create a new Apple ID (not a developer account because it will ask you to pay). Then in the project in XCode, Signing & Capabilities, under Team, I 'Add an account' with that new apple ID. Remember to also generate a certificate and have a unique bundle identifier. Hopefully this is straightforward.
Then from there, clicked build, it asked me to enter my password a few other times and I clicked 'always allow'.
The app magically showed up on my phone with the same 'not trusted device etc etc' and then in Settings > General > VPN & Device Management, the newly created Apple ID appeared with the app I was working on and click Trust.
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags: