Help with the pomodoro clock logic

I just don’t get how to programm the logic on the pomodoro clock project

tried recursion tried while loop with setTimeout for every iteration but it just won’t work i just don’t get the timer working and doing a countdown ?
And i don’t want to look at someone others code ?

Any hints how to programm the timer ?