I have recently faced this issue when I was trying to delete a version history in the library. It says that the Version of this item cannot be deleted because it’s on hold or retention.

You are getting this error because there must be retention scheduled for your site collection in the Admin center. This error is not specific while deleting huge versioning details. In fact, if you delete a list or library with too many objects, you will get the same error with another message.

Follow the below steps to solve the issue. I have created a step by step solution of how to resolve it.