DIAGNOSIS The scan drivers or the Brother software suite on your computer is likely the issue, not the network. The utilities can get corrupted or have permission conflicts, especially after a Windows update.
FIX Go to the Brother support site and download the full 'Driver & Software' package for the DCP-L2640DW for your specific operating system. Uninstall all existing Brother software from your computer's Control Panel first. Then, install the fresh download, making sure to run the installer as an administrator. During setup, choose the 'Network Connection' option and let it search for your printer.
IF THAT DIDN'T WORK Try a direct USB connection for scanning temporarily to rule out the network. If USB scanning works, the problem is a firewall or network permission. You may need to add an exception for the Brother software in your Windows Defender Firewall or any third-party antivirus you're running.
HEADS UP Brother's software installs a utility called 'ControlCenter' for one-touch scanning. If you don't use that, you can often scan directly through Windows' own 'Fax and Scan' app by adding the printer as a network device there—it's a less finicky method.