There are a couple of third party apps that can be used to troubleshoot the USB OTG connectivity issues. Here are a few such apps -
1. OTG Troubleshooter This app shows the condition of the cable. It ensures the connectivity of the device. You need to disconnect and reconnect the cable when prompted to do so.
2. OTG disk explorer The app can be used to view the files stored on the connected device. Just connect the USB device to your phone and open the app. You can then use your favourite apps to open the files. The free version works for files of size upto 30 MB. For more than that, you need to upgrade to Pro version.
Now that you have mentioned that the OTG functionality was supported before you formatted your pen drive, it clearly means that the current file format on your drive is not supported on your phone. Check the phone help guide or check with the official helpline to get to know of the file format supported. You can then format the pen drive to the supported format and then it should work on your phone again.