Hello kms0170,
Welcome to Apple Support We understand you have been receiving an error that you do not have enough storage on your Mac to backup your iPhone.
Based on the information you've provided, about purchasing iCloud storage, as well as deleting items from both devices are great steps to begin with.
Next, check to see what the total storage is on your iPhone and on your iMac.
To find the total storage size on your iPhone: Go to Settings > General > About > Capacity.
To find the total storage size on your Mac: Go to the Apple menu in the top left corner of the screen > About This Mac > Storage tab > you'll find the total storage below the icon of the hard drive at the beginning of the graph.
If you find that the total storage of your Mac is 128GB and your iPhone is showing a capacity of 256GB you will be unable to backup your iPhone to your Mac. Your Mac will need to have the same amount of available storage that your iPhone is showing for Capacity.
Let us know the results.