The S6 is 6 years old/5 if the 5g version so I imagine it's more the device struggling at this point than anything else. Software would also be very out of date due to the fact the device hasn't had updates in quite a few years; some apps may struggle with compatibility. Especially the batteries within the device. IMO it may br worth looking at a new device.
But you could try
*hold volume down and power button until device restarts (soft reboot)
*go to the app store on both google and samsung store and make sure everything is up to date
*check storage and make sure theres space- low storage can cause issues
*keep out of sunlight for too long- summer isnt very kind to devices
*try use the "device care" app if available