Please perform the following steps:
1- Use Samsung original OTG cable or try using different OTG with your device.
2- Check by other pen drive.
3- Perform Interactive checks through the Samsung Members app (Samsung Members> Get Help> Interactive checks->charger/USB).
4- Check the device performance in safe mode.
5- If issue still persists, create data backup and reset the device.
For further assistance, register your concern in Samsung members app(Open Samsung members app>click on “+“icon>send feedback>Error report/ Ask Questions).
Team Samsung Members