Yes, USB memory sticks, also called flash drives, and external disk drives can be used with iPhones and iPads by connecting to the charging socket.
If you have a recent iPhone or iPad with a USB-C charging socket you can connect many external devices with USB-C plugs directly to your iPhone or iPad. It may be simplest to replace old memory sticks or external drives with ones with USB-C connectivity. I think you'll be OK plugging memory sticks directly into the charging socket but devices with higher power requirements will cause the iPhone or iPad to display a message that it cannot provide sufficient power unless those devices have their own power supply. For external disks without their own power supply you may need to purchase an inexpensive powered USB-C hub to place between the iPhone or iPad and the external disk.
Two photos: one shows an iPhone 15 Pro with a memory stick inserted directly into its USB-C charging port. The second photo shows the memory stick. Its body can be rotated in its cover so that either a legacy USB-A or USB-C plug is presented. The iPhone screen in the first photo shows the Files app's Browse screen. The memory stick is listed under locations which include iCloud Drive, On My iPhone, the memory stick, named BRIAN01 and Recently Deleted. The memory stick was named by double tapping and holding after selecting its original name to reveal a menu of choices. Non-VoiceOver users should tap and hold for this menu.
Old iPhones and iPads have Lightning charging sockets and many flash drives and some external disks use the legacy larger rectangular USB-A plugs which only fit one way round. These cannot be inserted directly into either a Lightning or USB-C charging socket and an appropriate adapter will be required. Any adapter you purchase will fit into the charging socket and you must buy the correct Lightning or USB-C adapter. Lightning and USB-C plugs are very similar. Lightning plugs are completely flat while USB-C plugs have a hollow centre which you may be able to see or feel with a fingernail. If in doubt, get assistance before purchase.
I recommend buying Apple branded adapters. I've had problems with cheaper products from other manufacturers. For historical reasons some of the devices you may need are called camera adapters.
Apple sells two camera adapters for iPhones and iPads with Lightning charging sockets. Apple's Lightning to USB Camera Adapter has a lightning plug at one end and a USB-A socket at the other. The Lightning to USB-3 Camera Adapter also has a USB-A socket and offers better speeds for flash drives and external disks with USB 3 connectivity but will work fine with earlier devices. This adapter also offers the option to provide power with a lightning power cable which would avoid the need for a powered hub.
To connect devices with USB-A plugs to iPhones and iPads with a USB-C charging socket you will need Apple's USB-C to USB Adapter. This should allow you to connect most flash drives directly but you may need a powered USB hub if you connect an external disk which has no power adapter of its own.
The Files app will spot the flash drive or external disk and will give you full access to its contents. There are some restrictions to how the external device should be formatted but these are unlikely to pose a problem.
Finally, here's a link to Apple's information on connecting external devices to iPhone and connecting external storage devices to iPad