If this was code I'd have to review I'd give the feedback that the wrong information is kept in state.
After start the only thing the setTimeout should do is set the game to be finished and then show the final count to the user. If the code wouldn't have used an alert which definitely is a side effect of a function it gets apparent where the code went outside of the React loop. Not defending that but saying that alert and console.log conflict with React's always re-execute approach and for those cases, as you would have guessed, you can use useEffect and only listen to the finished state to execute your alert.
Throwing a console.log/alert into the direct function body of a component just asks to be spammed by rerenders (assuming the average developer)
After start the only thing the setTimeout should do is set the game to be finished and then show the final count to the user. If the code wouldn't have used an alert which definitely is a side effect of a function it gets apparent where the code went outside of the React loop. Not defending that but saying that alert and console.log conflict with React's always re-execute approach and for those cases, as you would have guessed, you can use useEffect and only listen to the finished state to execute your alert.
Throwing a console.log/alert into the direct function body of a component just asks to be spammed by rerenders (assuming the average developer)