The Uno WiFi you have selected from the Tools > Board menu is different from the Uno WiFi Rev2 Arduino board you own. Please do this:
- Tools > Board > Boards Manager
- Wait for downloads to finish.
- Scroll down until you see "Arduino megaAVR Boards by Arduino". Click on it.
- Click "Install".
- Wait for installation to finish. You may be prompted to install a driver, if so, confirm that you want to do this.
- Click "Close".
- Tools > Board > Arduino Uno WiFi Rev2
Now try uploading again. Hopefully it will work this time!