Why is my Samsung Galaxy J5 (2016) dropping the Wi-fi connection every 20 seconds?

A

AC Question

I have a Samsung Galaxy J5 (2016) that worked perfeclty fine until 2 days ago. The wi-fi keeps connecting and disconnecting every 20 seconds and that is so annoying. My home wi-fi is the only one that this is happening, it works perfeclty fine in every other wi-fi that i have tried since then. And i don't know whose fault it is, the phones or the routers, since every other device works perfectly on the same router (I also have other Samsung devices connected to it). I have tried a lot of possible solutions, but none of them has worked so far. Please help me!
Thanks in advance.