Since the old iPhone is already struggling, I’d make a backup before trying the transfer again.
Then restart both iPhones, plug both into power, make sure Wi-Fi and Bluetooth are on, and try Quick Start again. Apple recommends keeping both phones connected to power and close together until the transfer finishes.
→ Use Quick Start to transfer data to a new iPhone or iPad - Apple Support
If it fails again, I’d skip the direct phone-to-phone transfer and use an iCloud backup instead. On the old iPhone go to Settings > General > Transfer or Reset iPhone > Get Started under Prepare for New iPhone. Apple can provide temporary iCloud storage for the transfer if needed.
→ Get temporary iCloud storage when you buy a new iPhone or iPad - Apple Support
Most importantly, don’t erase the old iPhone until you’ve checked that everything you need is safely on the new one.