After obtaining a residence permit in Slovakia, each foreigner must be insured in accordance with EU legislation and requirements. It doesn’t matter on what basis a residence permit was obtained, it can be studies, business, employment. Everyone must be insured.
Citizens of countries with a visa-free regime (Ukraine, Georgia) will need insurance immediately after obtaining a residence permit. And citizens of countries with a visa regime (Russia, Belarus, Uzbekistan, Kazakhstan, etc.) will need insurance even at the stage of obtaining a visa D at the consulate of Slovakia in their country. The consulate requires providing, along with other documents, a valid insurance policy. Citizens of visa countries need to take care of insurance in advance. Then you can provide the same insurance to the foreign police in Slovakia.