I know of a manga where the main character died and woke up as a prince in another world/country. He was deemed useless, but was always protected and taken care of by a girl (his fiancée), and the nobles controlled the city from behind.
But then he can go into a game world to level up, and I think it has a timer for how long he can remain in the other world to train. Each time he grows and attains a new job title, and supposedly obtains all possible job titles like paladin, etc.
I think the church held much power, but he was able to control that aspect related to his city. There's also a strong female knight in his city. And the beginning was when a demon prince wanted to conquer his city.