Like a Mighty Army (Safehold #7) by David Weber
Synopsis from GoodReads:
For centuries, the world of Safehold, last redoubt of the human race, lay under the unchallenged rule of the Church of God Awaiting. The Church permitted nothing new-no new inventions, no new understandings of the world.
What no one knew was that the Church was an elaborate fraud–a high-tech system established by a rebel faction of Safehold’s founders, meant to keep humanity hidden from the powerful alien race that had destroyed old Earth.
Then awoke Merlyn Athrawes, cybernetic avatar of a warrior a thousand years dead, felled in the war in which Earth was lost. Monk, warrior, counselor to princes and kings, Merlyn has one purpose: to restart the history of the too-long-hidden human race.
And now the fight is thoroughly underway. The island empire of Charis has declared its independence from the Church, and with Merlyn’s help has vaulted forward into a new age of steam-powered efficiency. Fending off the wounded Church, Charis has drawn more and more of the countries of Safehold to the cause of independence and self-determination. But at a heavy cost in bloodshed and loss–a cost felt by nobody more keenly that Merlyn Athrawes.
The wounded Church is regrouping. Its armies and resources are vast. The fight for humanity’s future isn’t over, and won’t be over soon…