Both parties won an absolute majority of seat in the parliament of their respective countries, and that without winning an absolute majority of the votes, because of how the election system works.
Both parties are also defend conservatives views, which people might or might not like. However, the UK's conservatives, while they are opposed by many they aren't considered dangerousthey aren't considered dangerous, while the PiS is considered very dangerous for democracy. Why is there a difference?