When the Sun exhausts its nuclear fuel and enters the red giant phase, it will expand significantly, engulfing and heating up the inner planets, including Earth. This phase is estimated to occur in about 5 billion years. Moving an entire planet like Earth to a larger orbit is an enormous engineering challenge that currently exceeds our technological capabilities. The gravitational forces involved and the energy required for such a feat are currently beyond our reach.
However, there have been speculative ideas proposed in science fiction and some scientific discussions about potential methods for moving planets. These concepts involve advanced technologies, such as using massive spacecraft to alter the orbit of a planet over extremely long timescales. Yet, these ideas remain highly theoretical and far from practical implementation.
Moreover, even if we were capable of moving Earth to a larger orbit, it would not completely protect the planet from the effects of the Sun's expansion. The red giant phase of the Sun will likely cause extreme heating and an increase in radiation, which could strip away Earth's atmosphere and make the planet inhospitable for life as we know it.
Instead of moving the Earth, a more feasible approach for preserving the long-term survival of the human species would involve focusing on space colonization and exploration, seeking out habitable environments on other planets or moons within our own solar system or beyond. By establishing self-sustaining colonies in space, humanity could ensure its continued existence even in the face of changes to our home planet or the eventual evolution of the Sun.