When it comes to Social Security, European regulations are governed by different rules, the main ones being Rule No 883/2004 of the European Parliament and of the Council of April 29 th, 2004, on the coordination of social security systems, and Rule No 987/2009 of the European Parliament and the Council of September 16 th , 2009, adopting the rules for implementing Rule No. 883/2004.
This regulation is based on the principle of lex loci laboris in which a person who performs a professional activity in an EU member state is subject to the laws in that country.
EU regulations and the bilateral agreements signed between countries permit exceptions to this rule in the case of temporarily displacements, and also for cross-border workers. But, as we pointed out, the general rule is that if you work in a country, your social security contributions must be paid there, even if that is not the country in which your company is located.
In any case, each case must be reviewed and, given the particularities produced by the pandemic, the recommendation is to consult the Social Security authorities of each country involved for their interpretation of the EU regulations in order to avoid future contingencies.