Since 2005, we have had federal legislation enacted to require and govern preventative measures due to pandemic, like COVID-19, including mandatory self-isolation and quarantine and enforcement measures. The federal Health Minister is also statutorily empowered to require Ontario to take quarantine measures, including stay-at-home orders, closure of non-essential businesses and to establish self-isolation/quarantine facilities for those who do not comply.
The legislation is comprehensive and provides for all necessary preventative measures and enforcement.
Link to the legislation:
https://www.canlii.org/en/ca/laws/stat/sc-2005-c-20/latest/sc-2005-c-20.html