In regards to clearing your phones system files cache this may help.
Clear your System File Cache via the instructions in the Samsung Link. You may need to hook upto a computer or insert your headphones to get to the recovery menu. https://www.samsung.com/uk/support/mobile-devices/how-do-i-clear-the-cache-on-my-device/
Also try Safe Mode.
https://www.samsung.com/uk/support/mobile-devices/how-to-start-my-galaxy-device-in-safe-mode/ disables downloaded apps, themes and other launchers to help determine if one or more is causing conflict.
As a very last resort back up and factory reset.
A Samsung Experience Store / Samsung Service Centre can take a look and run Diagnostics.
I wish you all the best with this situation.
Current Phone > Samsung Z Fold³ 5G. > Software : Android 12 ~ Samsung One Ui 4.