While recipes are the best guide you have to determine how long something needs to bake for, there are many variables to consider, such as altitude, humidity, oven size, and so on. If your recipe was discovered online, you might consider perusing the recipe comments and reviews to see if anyone’s commented on the bake time.
A few minutes before the recipe is supposed to be finished baking, check on it. A lot of bakers use the toothpick trick – inserting a toothpick into the center of the cake to see if it comes out clean. Or you could try the finger method by pressing a clean finger in the center of the cake to see if it springs back (it’s done!) or sinks in (let it bake a few more minutes). In other words, your baked goods need supervision because a burned cake just can’t be saved.