You can disable the interface that is used to connect the device to the printer. Make the restriction settings to restrict printing other than via network.
You can also make the restriction settings on the printer's control panel.
PC Connection via USB : Settings > General Settings > Printer Settings > PC Connection via USB
Enter the printer's IP address into a browser to access Web Config.
Enter the printer's IP address from a computer that is connected to the same network as the printer.
You can check the IP address of the printer from the following menu.
Settings > General Settings > Network Settings > Network Status > Wired LAN/Wi-Fi Status
Enter the administrator password to log in as an administrator.
Select in the following order.
Product Security tab > External Interface
Select Disable on the functions you want to set.
Select Enable when you want to cancel controlling.
PC connection via USB
You can restrict the usage of the USB connection from the computer. If you want to restrict it, select Disable.
Click OK.
Check that the disabled port cannot be used.
PC Connection via USB
If the driver was installed on the computer
Connect the printer to the computer using a USB cable, and then confirm that the printer does not print.
If the driver was not installed on the computer
Windows:
Open the device manager and keep it, connect the printer to the computer using a USB cable, and then confirm that the device manager's display contents stays unchanged.
Mac OS:
Connect the printer to the computer using a USB cable, and then confirm that the printer is not listed if you want to add the printer from Printers & Scanners.