If an item in a document library is no longer needed, you can delete it. When you delete a folder, SharePoint Online also deletes any files or folders that are contained in it.
If you delete something but need to get it back, you may be able to restore it from the recycle bin.