If you were not legally married on 12/31/2023 you file your 2023 tax return as Single.
If you were still legally married on 12/31/2023 you can file as either Married Filing Jointly or Married Filing Separately. If you file as MFS you still need to enter your spouse's name and Social Security number on your tax return. Nothing further is required concerning your spouse unless you live in a community property state, then it becomes much more complex.
See this TurboTax support FAQ for filing separately in a community property state - https://ttlc.intuit.com/turbotax-support/en-us/help-article/taxation/married-filing-separately-community-property/L11CeLUMs_US_en_US?uid=lu5t1hjn
If you were divorced on December 31st, then you are not considered married and would not use one of the married filing statuses; no ex-spouse information will go on your return.
However, if you were still married on December 31, 2023, you are still considered married for tax purposes. You could then choose to file as married filing separate. In that case you would need to enter your spouse's name and social security number on your return.
In addition to what DoninGA posted, if you are using the married filing separate status, you also both are required to choose the same deductions. For example, if one is itemizing the other must itemize or both use the standard deduction.