Here’s how to delete a media, once inside your public/private library, you need to activate the “select” mode.
Once done, you need to select the media you want to delete to make the action buttons to appear and then use the the “Delete selection” button to delete one or more media/folders.
On Twenty Twenty-Three, there might be some CSS rules that are not applied. My screenshots were made using Twenty Twenty-Two.
I can’t delete the other topic, but I’ll link this reply to it.