This article explains how to get in and out of iPhone Recovery Mode for all iPhone models, including iPhone 8 and later, iPhone 7 series and earlier. It includes information on when to use Recovery Mode.
How to Put iPhone into Recovery Mode [Full Guide 2024] – iOS 17/16 Supported
If entering recovery mode and restoring the iPhone is successful, recovery mode will be exited automatically when your phone restarts.
You can also get your iPhone out of recovery mode without restoring your phone (if your device was working fine before. If not, recovery mode is still your best option). To do that:
Disconnect the device from the USB cable.