This question already has an answer here:
Did the Avengers timeline change after stark snaps his finger and kills "Thanos from the past"?
if "Thanos from the past" if killed in the movie ending in the present, then that would mean there would be no Thanos in the past who'll collect stones and wipe out half the universe right?
And that alters the timeline?
Not only this, when Cap from the present goes back to restore the infinity stones and decides to live his life fully... doesn't that mean there would be two Caps now in the present... One who'll go through Hydra, icing, and all that we know and the other one who lives his life with Margaret?