You need to use the board manager to download the core for the Arduino megaAVR Boards (Nano Every and Arduino WiFi Rev2).