If your work income is reported to you on a 1099-NEC or 1099-MISC instead of on a W-2, the IRS considers you a self-employed individual, not an employee.
A self-employed individual can open an HSA, but according to HSA rules set by the IRS, you can only open an HSA if you’re covered by an HSA-eligible high-deductible health plan (HDHP).
This website has more details for you:
https://www.bendhsa.com/hsas-for-small-business
As @Critter-3 pointed out, only certain limited types of health insurance can be purchased with HSA funds.