It might be the composition settings, you can fix it by going to composition at the top left, clicking on it, click composition settings go to duration and change it (I put it to 5 mins then when I’m done with my edits that are less the 5 mins long I change it to the exact time the edit ends in the timeline then render it.