to re-install the stock ROM (the original software) as it was, you can use ODIN (a tool made by Samsung).
Follow this howto, but instead of download and install TWRP, you have to download and install the stock ROM.
You can download it for free on sammobile (create a dump account and wait 1 or 2 hours for the download to complete, and unzip the zip file, then on ODIN click on “AP” and select the file).