Persons who have an insurance relationship can become entitled to all health insurance benefits by paying contributions. Uninsured persons (e.g. pensioners, people receiving childcare) can only become entitled to health benefits under social security rules on the basis of social solidarity, because although they do not pay contributions themselves (but someone, like the state pays instead of them), they cannot be deprived of health care.
Remember you are a “resident for social security purpose” (“belföldi”) if you are:
Hungarian citizens with a registered place of residence in the territory of Hungary, immigrants, persons with settled status (meaning permanent residency permits) or persons recognised as refugees or beneficiaries of subsidiary protection (beneficiaries of international protection)
a person with the right of free movement and residence who has a registered place of residence (EU citizens)
stateless persons
Under social security rules, you are only entitled to health care if you are:
person in receipt of childcare allowance, pension, other cash benefits (health care and childcare allowance or employment substitute allowance), or other allowances ( infant care allowance, adoption allowance, childcare allowance, accident sickness benefit, accident allowance, minding allowance, war allowance…), if you are a resident for social security purposes,
an adult Hungarian citizen, refugee, beneficiary of subsidiary protection if you are studying in a public education institution, vocational school or higher education institution subject to the Act on National Public Education from the beginning of your student status until the end of your entitlement to a student card (you are also entitled during the suspension of the student status),
a foreign national who is a student or pupil on the basis of an international treaty or a scholarship granted by the Minister responsible for public education, higher education or foreign policy,
a minor who has Hungarian citizenship, refugee or subsidiary protection status and is residing in Hungary, and a minor who is not a Hungarian citizen but is resident in Hungary,
For the full list (in Hungarian) visit: https://www.neak.gov.hu/felso_menu/lakossagnak/ellatas_magyarorszagon/jogosultsag_az_ellatasra/az_egsszsegbiztositas_szolgaltatasaira_jogosultak/kizarolag_egeszsegugyi_ellatasra