I actually was on a work visa before this and then I switched to spouse visa, so my date of entry was more than 2.5 years ago.
So am I understanding I can’t apply until 23rd of December 2023?
Yes, that's correct - the earliest date you can apply is 28 days before 20th January 2024. You can submit the online application at any time between 23rd December and 20th January.
Would that be enough time to cover myself, as I don’t want to be in a situation where I don’t my new visa and it’s already 20th of Jan 2024 and will become out of status.
It doesn't matter if you have the new visa by 20th January or not. You just need to have submitted the online application before 20th January. The biometrics appointment and visa processing can happen after this date and it won't affect your immigration status.
As long as you have applied online (your official application date) before your current visa expires, your immigration status will be automatically extended under Section 3C Leave while your visa is processing, meaning that as long as you don't leave the UK during this time, you can continue to live and work in the UK while you are waiting for the new visa.
See here for more information about Section 3C Leave:
https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1066178/3C_and_3D_leave_v11b.pdfFrom that document:
Section 3C leave extended when an in-time application is made
An in-time application is an application made by a person in the UK who at the time of application has leave to enter or remain.
Where an in-time application to extend or vary leave is made and the application is not decided before the person’s existing leave expires, section 3C extends the person’s existing leave until the application is decided (or withdrawn).
Section 3C does not extend leave where the application is made after the applicant’s current leave has expired.