Put the phone in Safe Mode just to see if one or more of your apps are causing issues @raffaelak226
Put the phone in Safe Mode which disables your downloaded app's but let's your stock app's keep working. If the issues stop then this highlights a downloaded app as the possible issue. Come out of Safe Mode and start deleting your most recent downloaded app's one at a time until it stops. https://www.samsung.com/uk/support/mobile-devices/how-to-start-my-galaxy-device-in-safe-mode/
Clearing the system cache files can help too.
Clear your phone's System Cache Files by turning your phone Off and then from a set series of button presses go into the phone's System Files and clear the cache. No information is lost this way. You may need to insert your headphones or hook upto a computer with your data cable to get to this menu on the phone.
If you feel the phone is at fault and all the software and apps are updated and your not using any apk files etc them have it checked out or if under any relevant Cooling Off Period then have it swapped out.
I wish you all the best with this.
Current Phone >Samsung Z Fold³ 5G.
Previous Phone > Note 20 Ultra 5G SM-N9860.