This is a long shot, but parts of your description remind me of City at World's End, a novel by Edmond Hamilton which was also the answer to the old questions Wake up a planet by detonating deep down in the core? and 50s Sci Fi book: "Superbomb" sends town to far future with Sun a red giant star and Book about a town that is transported by an explosion into a freezing desert. The text is available for free from manybooks.net, or you can read the original magazine version (possibly shorter) at the Internet Archive, or listen to a reading at Librivox.
I remember reading a novel from maybe the 80s
City at World's End was originally published in 1950, but you might have read the 1974 Fawcett Crest edition or the 1983 Del Rey / Ballantine edition.
about a village on Earth in the far future,
Not a village but a 20th century American small town named Middletown was propelled to the far future by a "super-atomic bomb."
after the Sun has gone red giant.
I don't know about the astrophysics, but in the story the sun is bigger and redder and colder than it used to be:
It wasn't the Sun — not the Sun they and all the generations of men had known as a golden dazzling orb.
They could look right at this Sun without blinking. They could stare at it steadily, for it was no more than a very big dull-glowing red ball with flames writhing around its edges. It was higher in the sky now than it had been before. And the air was cold.
The protagonist discovers that an 'alien' visitor is a descendant of humans who left Earth millennia ago.
The Middletowners are visited by a delegation composed of humans and various kinds of space aliens. The human visitors are indeed descended from people who abandoned Earth long ago:
Piers Eglin was speaking on. "We didn't dream of such a possibility when we were sent to investigate the signals from Earth. No one has lived on this planet for thousands of years."
[. . . ,]
Piers Eglin eagerly explained. "I'm an historian, specializing in the pre-Atomic civilization of Earth. I had to learn its
language, from the old writing and speech-records still preserved. It's why I asked leave to accompany this party."
"But why is Earth lifeless? What happened to its peoples in these ages that have passed?"
The other told him, "Earth's people in those ages spread out to other worlds. Not so much to the other planets of this System — the outer ones were cold, and watery Venus had too tiny a land-surface. But to the worlds of other stars, across the galaxy.
"But as time went on Earth itself grew so cold that even in these domed cities life was difficult. So the Board of Governors evacuated the remaining people of Earth to other, warmer star-worlds."
The visitor brings 'magic' technology
One of the space-humans has a plan to make Earth habitable again using magic technology :
"Most planets, like your Earth, have a central core of iron and nickel. Now a transformation of iron to nickel in cyclic reaction had been achieved in the laboratory, liberating much energy. I asked myself — instead of in a laboratory, why not start that reaction inside a planet?"
"Then it woul reproduce the basic solar reaction inside such a planet?" Kenniston said incredulously.
"Not really, for the iron-nickel cycle does not yield such terrific radiation as your Solar Phoenix," Arnol corrected. "It would, however, create a giant solar furnace inside a planet and raise the surface temperature of that world by many degrees."
that causes an existential crisis in the village
Conflict arises because the proposed technological fix is considered dangerous and has been outlawed, so most of the spacers want to evacuate the Middletowners to another world, but they are reluctant to leave Earth.
and the protagonist eventually leaves to find an underground city or space elevator to leave Earth or something.
There is no underground city or space elevator in the story. There is a domed city and a very deep hole in the ground which in ages past brought subterranean heat to the surface.
I thought the title had something to do with the protagonist's job of protecting the village from the constant wildfires, like 'Fire Guardian' or 'Watcher' or something
That doesn't seem to match anything in the story.