The most common reason for a Raspberry Pi Pico not being detected by a computer is the micro-USB cable being used.
There are two types of micro-USB cable - the 'bad' type that only passes power for charging/powering a device, and the 'good' type that passes power + data for connecting phones and other devices to computers to transfer music, files and other data.
You need a power + data micro-USB cable when using the Pico, as this lets the computer and Pico 'talk' to each other for programming.
We have two quality cables in the store which are both the power + data variety: