Dear Charletta Thompson
Good day!!
Apologies for the inconvenience caused and please don’t worry, let’s work together on your concern and move towards a resolution path.
I understand your concern and to my knowledge, the error you are encountering when deleting the folder appears when the retention policy or hold is applied on the SharePoint Online site and the folder subjected for deletion is having the files inside it.
Since you have mentioned they are no files inside the folder but still encountering the prompt, then I would like to suggest you switch the experience to Classic and check whether you are able to delete the folder without any issue.
Open the Document Library where the folder is located> At the bottom left, Return to Classic SharePoint> Select the folder and try to delete to check the outcome.
If the same problem persists, in the modern experience of the Document Library, please try the below steps:
Open the Document Library> Right-click on the problematic folder> Move to> My Files> Move here> Now go to your OneDrive for Business, try to delete the folder from there.
If none of them works, we are sorry and I believe the problem should be further investigated by related development team via collecting HAR logs because there is no any related service incident reported at the Microsoft Service Health dashboard.
I do feel regret for not resolving the problem and redirecting you to the related development team but the fix to your concern can be find out through the HAR logs and suggest you raise a support ticket from the Office 365 admin center, where the related team will investigate the problem further by collecting the HAR logs.
Reference: Get support - Microsoft 365 admin | Microsoft Learn
Note: To create a support ticket, you need to have admin privileges and if you aren’t admin of your Office 365 organization, please contact the admin of creating a new ticket.
Appreciate your patience and understanding. Have a great day!!
Best Regards,
Sophia