A very easy way to connect two PCs is to use a USB-USB cable. By connecting two PCs with a cable like this, you can transfer files from one PC to another, and even build a small network and share your Internet connection with a second PC.
You can do some stuff to connect computers directly together but generally if they’re on the same network its easiest to just share stuff over the network - in Windows you can share folders to transfer files, or even share a printer if it’s not wireless and you want to use it with more than one computer.
Yeah nowadays you can just have the two computers on the same network and that would allow for you to gain access to each others files without the need of any wires as such. By simply selecting the remote desktop option.
You can only connect two computers via USB using a special data transfer cable, a plain USB-USB connection would damage one or both computers. Alternatives are a crossover patch ethernet cable directly connecting both computers or by sharing folders over a home network, or using cloud storage such as google drive with a shared link for different people or by simply logging into the same account across different computers
Crossover ethernet (commonly referred to as a null modem) cables are not required with modern ethernet ports (since 10 years or so), you can use a normal ethernet cable and the internal circuitry of the ethernet port will do the crossover automatically.