For example, for childhood vaccines, France does it by a hefty fine (up to 30.000 Euros) and up to two years in prison if you avoid vaccinating your children.
Maybe the same can be done for adults as well? We will see how they will attempt to enforce it.