Running an app on an iOS device requires it to be cryptographically signed by the developer, mostly for security reasons. Luckily, these days, Xcode itself can manage most of the process, like creating private/public keys, uploading the public key to your Apple Developer account, etc.
All you need to do is in the Xcode project settings, select a team. For a solo developer without the $99 Apple Developer program, I think it should say something like Your Name (Personal Team).