Freezing phones and fragmentation have nothing to do with each other.
Without any other details, here are some basic troubleshooting steps (for any phone):
1. Update the phone to the latest firmware.
2. Reboot the phone.
3. If the phone has an SD card. Remove it. Could be a bad SD card and the phone was unable to read/write from/to it.
4. Uninstall dodgy apps. Games, camera filter apps, etc.
5. If the phone still freezes, backup and reset to factory, and reinstall apps one by one and see if the problem comes back.
6. If problem still persists, then give Samsung a visit/call.