My phone slowed down a lot but I solved it

good morning everyone, I have a fairphone 4, in recent days the phone had slowed down a lot. Let me start by saying that the memory is not even half full. I didn’t understand the reason for the slowness, before doing a complete reset I decided to delete some large files. and magically everything started working as fast as it used to.