How to view page source in Safari browser on an iPhone? I thought there'd be an easy way to do this, but I may have been wrong.
How can I view the source for a web page using Safari browser on an iPhone?
Apple’s native solution is Safari Web Inspector. Currently all developer tools for iOS do still run on macOS so get out your mac and dive in if you want a first party solution.
Here’s a 5 minute tech talk, but the developer site has hours and pages of content depending on what you are going to do with this.

https://developer.apple.com/videos/play/tech-talks/401/

To enable on the iPhone - use the setting app, Safari, Advanced