The difference was definitely not caused by the salted or unsalted butter. It is also very unlikely that the problem was the flour.
Some of the usual reasons for muffins to come out flat are:
you forgot the baking powder (but then they are a complete failure, I guess you would have noticed if that had happened)
you measured by volume instead of by weight. This is very imprecise and can easily result in too little baking powder for the amount of other ingredients. You should use a recipe given in grams and a kitchen scale, if you want consistent results.
you let the prepared batter sit for too long before putting it into the oven, and the baking powder spent itself before the baking began
you baked at a wrong temperature, so the batter hardened either too early or too late.
you used ingredients at the wrong temperature (your eggs came from the fridge, your butter wasn't softened or you tried to soften it in a warm place and it melted, etc.) Always start with room temperature ingredients for baking.
You don't give us enough information to know which happened, but if you want to have good muffins every time, avoid these common mistakes and your muffins have a good chance of looking good in every batch.