So I am on iOS 14 and my iMac is on Big Sur. At least every other time my iPhone won't back up to my Mac as I get the message "an error" has occured. Other times it goes flawlessly Googling has not helped at all anyone with an idea what is going on?
Try using a brand new genuine Apple Lightning cable. Some 3rd party cables will charge an iPhone fine but run into trouble transferring data (in my experience).
Also never move the iPhone when it's connected to the Mac and make sure the Lightning port is clean. Wiggling the iPhone can cause a connection break if the connection is compromised
I have seen numerous people over the years have that problem regardless of which OS is used. I don't have an answer for you. Give iMazing a try. It is much more robust than using Finder and you won't get the error message like you have been.