Hello Theigel,
My condolences on your loss.
In the year your spouse dies, the IRS considers you married for the entire year. So, you have the option to file jointly or separately for 2023.
Not sure of your specific situation, but if you have dependent children you could file as a Qualifying Widower through tax year 2025 to receive the same tax benefits as if you were filing jointly. If not, you will need to file single for tax year 2024.
Again, my condolences on your loss and hope the information I shared helps.