Even though you just installed MiKTeX, you might update the packages to avoid issues with compiling documents.
- Start > MiKTeX > Update (Admin) You might need to run this twice
- Start > MiKTeX > Package Manager (admin) > Repository > Synchronize
Pretty much anytime you get an unexpected error, and you haven’t updated in a while, try the update procedure before going too far.
You can also try using Windows Subsystem for Linux for compiling your LaTeX documents in Windows.