Hello, thank you for reaching out to Microsoft Q&A.
Yes, you can delete files from OneDrive online to free up space. However, before deleting anything, make sure the files on your device are stored outside of the OneDrive folder (Local Disk C: / Users / Your Username / OneDrive).
First, move the files out of the OneDrive folder on your computer. Then delete a few of the files from OneDrive online and verify that they still remain on your hard drive.
Once deleted from OneDrive, you can permanently remove the files later from the OneDrive recycle bin next.
Let me know if you still need more help.