I'm running Windows 10 so I can't use any Linux commands which everything I've looked up has when faced with this issue. I've uninstalled and reinstalled it a few times, I've turned off my antivirus and it still doesn't connect. The blockchain finishes then it just restarts again in a loop. I cannot find a way to fix this.
This means either the daemon is not running on your machine or VM, or is running on a different port, or your OS is preventing the connection.
To check the first case: look at your list of processes (some equivalent of the ps utility)
To check the second case: look at the list of listening processes (some equivalent of the netstat or ss utilies)
If you do find a monerod listening on 18081 in the steps above, then it's your OS preventing the connection. A fix for this, though probably not the only one, is to change OS (and not only for that reason).