A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Dear Arif,
Thanks for writing back and updating with us.
As per the further updates, the error message you are encountering will generally occur when there is a retention policy applied on the SharePoint Online site, where the content in the site can’t be deleted for certain time period.
However, the end users will not be able to remove or change the retention policy, where the IT admins only can remove or change the retention policy applied on the SharePoint Online site.
So, I request you to contact the IT admin of your organization (How do I find my Microsoft 365 admin? - Microsoft Support) and request them to remove the retention policy applied on your site so that you can free up the space on your site.
Steps for the IT admin to follow are:
Access https://portal.office.com with admin account details> Click on the Need Help at the bottom right> Enter “Versions of this item cannot be deleted because it is on hold or retention policy in SharePoint Online site” and click Enter> Enter the Site URL having the problem> Run Tests
Now, ask the admin to remove the retention policy on your site so that you can delete the versions in your site.
Appreciate your patience with us and have a good day!!
Best Regards,
Sophia