The simplest method to create long screenshots on an iPhone works only when you’re using browser apps. Once you take a screenshot, tap the preview image that appears in the bottom-left of your iPhone’s screen. At the top, select Full Page to see the scrolling screenshot you need.
You can now edit and annotate this screenshot if you need to. When you’re done with this, tap the Done button in the top-left corner and select Save PDF to Files. You can save this long screenshot PDF either in your iCloud drive folder, or select On This iPhone to save it in your device’s local storage.
This method works with most browser apps on iPhone, but not all of them. I tested it with Safari, DuckDuckGo, and Chrome, and it worked on all of those. The same steps will also work on your iPad.