Try out these steps::
-
Do complete Uninstall Arduino IDE and then re-install the Arduino IDE (use Arduino IDE 2.3.0). Make sure that you install all the dependencies that shows up after the installation. If your machine is running Windows 11, check How to Fix Arduino Problem on Windows 11 and grant the IDE admin right.
-
Install your board's Package Core, it contains the board's driver.
-
Use a good quality data USB cable to connect the board to the computer without anything connected or wired to the board. Charging/bad USB cable will make it impossible for your computer to detect your board.
-
Make sure you select the board and the port it is connected to before uploading a sketch.
-
If #1-4 above fails to solve it, double tap the reset button fast and check the status of the onboard "L" LED. If the onboard LED fade in and out slowly (pulsating), upload an example sketch (Blink LED) from the IDE to the board. This will Reset your board