To exit macOS Recovery, just restart your device. You can also just shut down your device.
If you need to select a different startup disk, click on the Apple menu, then select Startup Disk and choose your desired startup disk. Click Restart.
If your device restarted as part of the Time Machine restoration or macOS reinstall, the restart will exit recovery mode as well.