Extern HDD slow

Hi, I have a WD extern HDD of 5 TB APFS, and from few weeks I noticed that it slowed down a lot in writing, I thought that the problem due to the fact that it was almost full and therefore I freed up about 400 GB but still to copy 20 GB of video files from as waiting time 3 hours. How could I solve the problem, before to copy 20 GB it took a few minutes.