Hi Carlos, it sounds like you have a large number of devices using your WiFi and you answered the question yourself when you mentioned having another iMac wired to the router. I would run ethernet cables to both iMacs instead of using WiFi. The connection will be more stable and much faster than WiFi.
If you are set on using the WiFi then you may need to run Wireless Diagnostics by holding down the option/alt key on your keyboard and clicking the WiFi icon in your system tray, top right of your screen.
It will bring up a wizard to follow to find any potential issues for you.
If you need help fixing any of those just reach out again.
Best of luck