The trick here would be to tariff exports from countries buying oil and gas from Russia.
Of course, since it just became more expensive for Europe to source energy, we should remove some of the import duties on European products to help them stomach the cost of the transition.