I read that Perun and Thor have so many identical simmilarities,both are redheaded and redabearded,both ride a chariot pulled by he-goats,and both wield a hammer/axe

Perun was portrayed as the Gold-moustacheous God, the Master of Thunder like Thor. His hair is blackened silver. His weapons are battle axe, a mace and the bow with arrows-thunderbolts. Whereas we know that Thus posessed only his battle hammer, Mjölnir.
Perun, as some specialists say, was Svarog's son and if Svarog may be in some ways compared to Odin, then Perun might be compared to Thor.

Yet Perun is the main God, unlike Thor. Perun's viking similar god is Odin

Well, he is not. Of course, you aren't wrong at all. In Kievan Russ not long before being baptised knyaz Volodimer (Vladimir, Volodymyr) tried to put Perun on the top of divine hierarchy but Perun being the top deity did not last for long and was not acknowledged as the main God by all the slavs of course.  ;D