Are you new to coding/iot/arduino ? If yes then its really hard to explain each and every step. Because without basic knowledge you cannot get things running. If you are copying stuff from the internet, and not analysing how it works, you will face difficulties in the future.
I said this because,
You need to learn what is setup and loop and where to place the code.
If you want only ota part follow this link
And OTA will not re provision your device. It will only update the firmware.