A reliable solution
- get two ethernet cables and a router
- connect the computers via the router
- make the Ubuntu computer into an ssh server by installing
openssh-server
- make the Windows computer into an ssh client by installing WinSCP or Filezilla (in Windows)
- connect via WinSCP or Filezilla and transfer the files. You can transfer a whole directory tree.
A direct connection with one single ethernet cable
The Windows end
You can find tutorials via the internet using a search string (without quotes) like "tutorial direct file transfer between two computers via ethernet", for example
https://techwiser.com/how-to-connect-pc-to-pc-lan-cable/
which describes what to do at the Windows end.
The Ubuntu end
You can find tutorials via the internet using a search string (without quotes) like "tutorial direct file transfer between two computers via ethernet linux" to find for example
https://www.softprayog.in/troubleshooting/connecting-two-computers-with-ethernet-lan-cable
which describes what to do at the Ubuntu end.
This is rather complicated, but on the other hand, you will learn a lot about networks.