These days you can use QuickStart, but probably not on any iPhone old enough that service will be discontinued (iPhone 5 series or older I believe).
You should be able to back up to a computer (PC or Mac) and then restore from it to transfer almost all the contents. There are some things that may not transfer though, including apps that are no longer supported and some settings or configurations don't necessarily transfer. I've found that large icons and fingerprints don't transfer. App only reload from Wi-Fi (at least for an iPhone 8) and if it's no longer available on the App Store there's not much one can do about it. Also - there can be incompatibilities in the app data when they transfer to considerably newer versions.
You don't even necessarily need to wipe the iPhone 8. The transfer will pretty much wipe it before transferring the data.
Transfer data from your previous iOS or iPadOS device to your new iPhone, iPad, or iPod touch - Apple Support
If you have any difficulties with this, you might try getting an appointment at an Apple Store and they should be able to help you with the transfer using their computers. My dad got a replacement iPad, and he'd never backed up before. They helped him do the transfer at an Apple Store before taking in the exchange.