for example, the first polish king was crowned by the holy roman emperor, while in france the kings were crowned by the pope. was there some sort of power struggle going on?
To answer the last question you asked (regarding a power struggle between the pope and the emperor), oh yes there was. Though the Emperor was named as such by the pope, the emperors of the HRE started taking more and more power, eventually deciding by themselves who would be the next pope. The most known power struggle between the two powers is called the "Investiture Controversy", and was related to the fact that the Emperor was naming people bishops, while it should have been the pope. This eventually lead to a menace of excommunication from the pope Gregory VII to the emperor Henry IV. This is a very easily accessible subject, you can read a lot about it even on wikipedia, it's not some obscure historical theory or anything.
But regarding the polish king, unless I'm mistaken, he actually used to pay tribute to the emperor, so I guess Poland of the time was inside the sphere of influence of the HRE, and therefore I guess the Emperor could indeed crown him. France though was not, so if a king had to be crowned, it would be by someone else.
There's a part about your question that isn't accurate though: the french kings, such as Saint Louis, were not crowned directly by the pope, but rather by a bishop. Perhaps you were talking about a guy like Charlemagne, who recieved the IMPERIAL crown from the hands of the pope? That would be because it's the imperial crown, and therefore only the pope could give it to someone (according to Constantine's Donation, which was proven to be a fake document).
and also, another follow up question if it is not too much. what would happen when a holy emperor was crowned by the elector princes, but the pope did not "recognize" him as the legitimate emperor? did u have alot of these types of conflicts,if any at all?
thank you for answering! and yes i ment charlemagne, but i also read somewhere that pepin the short was given the crown by frankish people, but was crowned king of the franks by the pope? or is that also not correct?