After the OTG is connected to the USB flash drive, you can pull down the status bar, click the option "Tap to remove USB device safely" in the notification of the status bar and then unplug the OTG device.
Related Articles:
How to turn on an OTG connection?