Yes. You can open an HSA at any point so long as you are on a qualifying HDHP. The amount that you are allowed to contribute will be the maximum so long as you had an HDHP as of Dec 1 in the year that you created your HSA and you maintained your HDHP coverage for the entire 12 month period thereafter (through the following calendar year). If you lose your HDHP coverage part way, the IRS form 8889 has a work sheet that will help calculate how much you are elgible to contribute. You can always e-mail us and we can help you navigate this situation as well!
Source: "Publication 969 (2018), Health Savings Accounts and Other Tax-Favored Health Plans.”