"Insufficient storage for iCloud Backup despite free space on iPhone 12 Pro Max: My iCloud Backup says 'Not enough storage' even though I have 5 GB free. Please clear old backup metadata for my iPhone 12 Pro Max on iOS 18.1."
-------
Backup iCloud Drive, and then Erase it:
- Backing Up iCloud Drive: Getting a Quick and Direct "iCloud Drive-to-External Hard Drive" Download - User Tip
- Erasing All of iCloud:
Do so using a computer.
If you erase all of iCloud, then all would be gone, except for Photos which you have 30 days to recover. So, consider backing items up (i.e. exporting contacts) prior to the erasure.
- Go to: System Settings
- Click: your name at the top of the window
- Click: Delete
- Confirm: the deletion
As for Troubleshooting iPhone Storage:
Internal storage cannot be upgraded. It is what it is. So, the maximum internal storage capacity never increases, even if you upgraded your iCloud plan. Learn More here: What's the Difference Between Device Storage and iCloud Storage? Apple Support
So, what to do...
Clear Space Using my User Tips: