It would seem you are running the free version of Office. Which, for Excel, does require you to put the file in OneDrive before editing.
1 - Uninstall any version(s) of Office you see in Settings -> Apps.
2 - Download and install the paid, desktop version, of Office you are entitled to by your MS 365 Subscription.
Download, install, or reinstall Microsoft 365 or Office 2024 on a PC or Mac - Microsoft Support