How to make a time limit bar

Hi I want to make a decreasing bar that has a certain amount of time until it finishes and then the game ends by moving to another level but I can’t work out how to make the time bar. Whenever I’ve tried, the bar won’t decrease. If anyone could pls help

Thanks

maybe a timer connected to a bar?