If you separated or divorced in 2021, the Canada Revenue Agency (CRA) will still require your ex-spouse’s/ ex-partner’s information. The info is needed for a number of reasons, like eligibility for certain credits or deductions, handling property you still own together, etc. This TurboTax FAQ has more information.
If you separated or divorced before 2021, you say "No" to the question "Did you separate from your spouse/partner in 2021?". Then you won’t need to provide any info about your ex-spouse/ ex-partner. This TurboTax FAQ has instructions on how to change your marital status if you have already passed that point.