In 2014, Thanos was alerted to the events of the Infinity War by a time traveling Nebula, and he used the Time-Space GPS and Pym Particles stolen from 2023 Nebula to travel to the future and lay siege to Earth in 2023.