5GB might be insufficient, specifically if you are trying to update a device running an old iOS version.
Assuming you're trying to update your device wirelessly, and bearing in mind that to perform such a procedure you need to connect your device to a reliable and fast Wifi Network with Internet access (no cellular data, unless you use a 5G network, no personal hotspot on your device, no VPN connections are admitted, no Low Power Mode enabled, and I suggest that you keep the device plugged into power during the whole update process), read this support article:--> If your iPhone, iPad or iPod touch won’t update
Keep in mind that, depending on the available storage on your device and/or on your wifi network speed, it might take 30-60 minutes to complete the entire update process.
If the issue persists or if the iOS version currently running on your device is very old, try to update it via computer (if you don't have a computer borrow one from your friends/neighbors, or ask for help at an Apple Store or Authorized Service Provider), then learn how to update your device manually if you're using a Mac with macOS Catalina or later, or if you're using a Mac with macOS Mojave or earlier or a Windows PC.
If you still get no help, contact Apple Support directly, using this link:--> Get Support
Regards
Giulio