You don't actually need to do that. You can use Xcode to put any app you compile onto an iPhone connected to your Mac, regardless of whether you're paying. However, if you're not paying then those apps will only work for 7 days before you have to re-deploy them.
I'm not saying this is great. Just that you were wrong. :D
(To be fair, this is a fairly recent change. 2019 or so, I think?)