About Fredrick I of Prussia
He was born in Konigsberg as a third son, this dynasty had a wast reach, he had a first cousin that was the current king of England, William III. Upon his father’s death he got the title and became Elector Fredrick III of Brandenburg which was in the current Holy Roman Empire and Duke of Prussia.
He was in opposition against France, he was in the alliance with the league of Augsburg and led some military forces against the French. This is opposite of his father who was pro-french.
The problem here was that the titles were in two different places, one of the title was in the Holy Roman Empire while the other Eastern Prussia was in Poland. It was really hard to manage two different parts like that and later with Fredrick the Great they would unite. He wanted to gain the title “king”, but the problem was the current law of the Holy Roman Empire only allowed one kingdom which was Bohemia. Because he was in the same war with the Empire he persuaded the current leader Leopold I to somehow gain the title king.
It was negotiated and he was crowned in 1701 in the town he was born Konigsberg. But other kings such as the Polish one considered this illegal and without the proper rights. But this was pretty interesting played, instead of calling himself king of Prussia, he was called himself King in Prussia. He also didn’t use the title he had in the Empire because there was an Emperor there and couldn’t get a title like that.
So this made him King in Prussia while still being a vassal of the Emperor. Keep in mind that yes formally the Empire was big but each Dutchy had it’s own politics that the Emperor had no power over. The emperor’s authority was weak and almost none existing. Years after Fredrick the Great took the throne he would call himself King of Prussia.