hsa and cobra

This ties into my prior question regarding contributing to hsa while on Cobra.  My husband and I, 64 and 65, contributed $4149.86 to cobra before he went on Medicare in June.  I then went on Cobra and will turn 65 March 2023.  Can I continue to contribute to to the hsa, and how to I figure out the amount that I can contribute through the end of 2022?  Thanks.