There are several things you can try to revive an undetected pendrive:
1. Try plugging the pendrive into different USB ports on your laptop or other computers to see if it is detected.
2. Check if the pendrive is appearing in Device Manager. If it's not showing up, try to update the driver for your USB ports.
3. Use a different cable to connect your pendrive to your computer.
4. Use free data recovery software such as EaseUS Data Recovery Wizard, Recuva, or Disk Drill to scan your drive and recover data.
5. If none of the above methods work, you can try using disk part command in CMD to manually format the drive. However, this will erase all data on the drive.
If none of these methods work, your pendrive may be damaged and may not be repairable. In this case, you will need to replace it.