The correct way to remove the OneDrive app from your PC:
1- Open the OneDrive app
2- Turn off file syncing
3- Turn off backing up
Now the OneDrive app is not doing anything on your computer.
4- Still in the OneDrive app: Unlink the OneDrive app from your Microsoft account
Now you have disconnected the app from your OneDrive.
5- Uninstall the OneDrive app (in the usual way you uninstall apps)
Now the OneDrive app is gone. Microsoft may try to re-install the app in a future update, but the app will not be enabled, so it won't do anything, and you can uninstall it again.
Something that you have to keep in mind before you do the above:
If the OneDrive app was previously syncing and backing up, then some of your files will be in your OneDrive and some will be on your hard drive. Microsoft makes it look like your files are in both places - that's what it means to sync - so some of what looks like files to you are actually pointers to a file. So before you start removing the OneDrive app, it's a good idea to ensure that all your files - your actual files - are in the same place, either in your OneDrive or your hard drive.
There's one other thing to keep in mind, and it only applies if you have Microsoft 365 aka Office. The Microsoft 365 apps save their output directly to your OneDrive by default. You can change this in the app settings. Do it in one app (e.g., Word) and it applies to all the apps.
You might not be in a mood to hear this, but saving files to cloud storage (whether OneDrive, Google Drive, Dropbox, etc.) has strong advantages if you control it rather than an app. Even file syncing has advantages, if you are in control. The way the OneDrive app is setup by default takes that control away from you, unfortunately.