If your M.2 SSD is not being detected by Ubuntu 20.04, there are a few troubleshooting steps you can try:
Check the BIOS: Make sure the M.2 slot is enabled in the BIOS settings. You may also want to check if any other settings are preventing the SSD from being recognized.
Check the connections: If the M.2 SSD is not securely connected, it may not be detected. Make sure it is properly seated in the M.2 slot, and that the screw holding it in place is tightened.
Check the kernel version: Some older kernels may not support certain M.2 SSDs. Make sure you are running the latest kernel version.
Check for firmware updates: There may be firmware updates available for your M.2 SSD that could improve compatibility with Linux. Check the manufacturer's website for any updates.
Check for driver updates: Some M.2 SSDs may require specific drivers to function properly with Linux. Check the manufacturer's website for any Linux-specific drivers.
Check the file system: If the M.2 SSD is not formatted with a compatible file system, it may not be recognized by Ubuntu. Make sure it is formatted with a file system that is compatible with Linux, such as ext4.
If none of these troubleshooting steps work, there may be an issue with the M.2 SSD itself. You may want to try testing it on another system, or contacting the manufacturer for support.