Okay, here is the logic.
Create a flag/Boolean variable. Set it to false initially.
In if condition check if that variable is true or not, if it is false don't run the setInterval. But when you click the button first time set variable to true and then when it will check for condition it will be true so interval will run and that's how you can make a clock working.
Try it 🤓