Restoring a phone to its original software after installing a custom ROM involves backing up personal data, downloading the correct firmware file, installing necessary drivers, putting the phone into download mode, connecting it to a computer, flashing the firmware, booting the phone, and setting it up again. This process erases all data and settings, so having a backup is essential.

How to Restore Your Phone to Its Original Software After Installing a Custom ROM
Restoring your phone to its original software after installing a custom ROM involves several steps. Here's a detailed guide to help you through the process:
Prerequisites
Before you begin, make sure you have the following:
- A backup of your personal data and settings.
- The original firmware file for your device.
- A USB cable.
- A computer with internet access.
Step 1: Download the Firmware File
Download the original firmware file for your device from a reliable source. Make sure it matches your device model and carrier.
Step 2: Install Drivers on Your Computer
Install the necessary drivers for your device on your computer. You can usually find these on the manufacturer's website or in the support section of their website.
Step 3: Put Your Phone into Download Mode
Turn off your phone completely. Then, press and hold the volume down button, home button (or Bixby button for Samsung devices), and power button simultaneously until the download mode screen appears.
Step 4: Connect Your Phone to Your Computer
Connect your phone to your computer using a USB cable. Make sure it's recognized by your computer.
Step 5: Flash the Firmware File
Use Odin or any other flashing tool compatible with your device to flash the firmware file onto your phone. Follow the instructions provided by the tool to complete this step.
Step 6: Boot Your Phone
Once the flashing process is complete, disconnect your phone from the computer and power it on. It may take a few minutes to boot up, so be patient.
Step 7: Set Up Your Phone
Follow the on-screen instructions to set up your phone. You may need to enter your Google account information and restore your backup if you have one.
That's it! Your phone should now be restored to its original software. Keep in mind that restoring your phone to its original software will erase all data and settings, so make sure you have a backup before starting the process.