I agree with @DianDD that factory reset after backing up might be a better option. Wiping the cache partition can be beneficial at times but has not had the desired effect. No restart issues for me either, though know problem for some.
I do not work for Samsung or make Samsung Products but provide independent advice and valuable contributions.
My Device- S21 Ultra 5G ( SM-998B/DS ) CSC= BTU , 12GB/256GB
One Ui 5.0,Android 13 .
Indeed, the option to 'wipe cache partition' often helps but still it's worth reporting the issues via the Samsung Members app as soon as they occur. This way our developers can analyze the problems and make sure they won't again appear 😊.