It can be closed directly through the firewall. It's simple. Find "Advanced Settings" on the left side of the "Windows Firewall" page in Control Panel to open it.
Locate the inbound rule on the left side of the Advanced Security windows Firewall page, and then right-click New Rule.
Select "Port". Click Next.
Here, enter any port to be closed into "Specific Local Port" and close one port at a time. The method is the same. Then click "Next".
TCP/UDP port numbers are independent of each other. For example, TCP can have 255 ports and UDP can have 255 ports, and they do not conflict.
Ports 135 and139,445 belong to TCP.
Ports 137 and 138 belong to UDP.
Select "Block Links". Click "Next".
Leave only "public" (for safety, I also chose private here).
I picked up the name and description casually, and it's finished.