This is one of things which makes Endgame's time travel better. In a number of time travel films notably in Terminator everything is sort of prearranged. John Conner exists because the machines sent back a robot to kill Sarah Conner.
Endgame goes with the idea of timelines so choices do matter. The first idea is easy to understand. Cap was always meant to go back in time and grow old. It was always going to happen.
The second idea makes sense if we consider the idea that the prime timelibe which we were witnessing was always a branched timeline. Among the two this is more convoluted but is consistent with the idea of the film that choices do matter. One can't undo a past choice by going going to the past. What has happened has happened. Changing that will create a new timeline without altering the prime timeline.