The model of time travel used in Endgame is not like the time travel of Back to the Future. When things are changed in the "past", it doesn't change the present, but instead creates a new timeline.
This means that there is a timeline where Thanos and his army simply disappears in 2014, he can't collect all of the infinity stones, the events of Guardians of the Galaxy cannot happen etc. But the events in the past of the MCU that we follow still happened the way we saw them. There is no paradox.
There is a scene in Endgame in which Rhodey and Scott Lang explicitly ask your question, and the Hulk answers:
James Rhodes: Wait wait a second, let me ask you something: If we can do this, you know, go back in time... why don't we just find baby Thanos, you know, and... [Mimes strangling baby Thanos]
Smart Hulk: Okay, first of all, that's horrible.
James Rhodes: It's Thanos!
Smart Hulk: And secondly, time doesn't work that way. Changing the past doesn't change the future.
Scott Lang: Look, we go back, we get the stones before Thanos gets them, Thanos doesn't have the stones! Problem solved!
Clint Barton: Bingo.
Nebula: That's not how it works!
Clint Barton: Well, that's what I heard.
Smart Hulk: Who told you that?
[James Rhodes and Scott Lang list a bunch of time travel movies]
James Rhodes: This is known!
Smart Hulk: I don't know why everyone believes that, but that isn't true. Think about it. If you go into the past, that past becomes your future, and your former present becomes the past, which can't now be changed by your new future!
Scott Lang: So, Back to the Future's a bunch of bullshit?