Pen drive not working
I recommend that buy new one, but if in case its important for you than ensure proper physical connection, try it on another computer, and check the Device Manager (on Windows) or Disk Utility (on macOS) for any issues.
Before going to buy a new pen drive, you should do some manual fixes to fix the error of the Pen drive. You can update the USB driver, reinstall the disk driver, recover USB data, change the USB drive letters, and format the USB to reset its file system.
You may need a computer to fix such issues and you can easily do some with cmd.