Start by making sure that OneDrive has downloaded everything. Open File Explorer and go to your OneDrive folder. If you see cloud icons next to files or folders, those files may exist only in the cloud. Right-click the OneDrive folder and choose "Always keep on this device." Let OneDrive finish downloading everything before proceeding. You want the files to show the solid green checkmark indicating that they are stored locally.
Next, copy your files to normal folders outside OneDrive. For example, instead of keeping your documents under C:\Users\<username>\OneDrive\Documents, create something such as C:\Users\<username>\Documents and copy the files there. Do the same for Pictures, Desktop, Downloads, and any other folders you have redirected into OneDrive. I recommend copying rather than moving initially, so you have the original OneDrive copy available until everything has been verified.
You can then copy those non-OneDrive folders to your NAS. For example, you might have C:\Users\<username>\Documents as your working PC copy and \\NAS\Backup\Documents as the NAS copy. This gives you a local copy on the PC and a second copy on the NAS without either one depending on OneDrive.
After verifying that the files are present on both the PC and NAS, you can stop OneDrive from managing your Windows folders. Click the OneDrive cloud icon in the notification area, open Settings, go to the Sync and backup section, and use "Manage backup." Turn off backup for Desktop, Documents, and Pictures if those are being backed up by OneDrive. When prompted about the files, choose the option that keeps the files on your PC rather than leaving them only in OneDrive.
You should then unlink the PC from OneDrive. In OneDrive Settings, go to Account and select "Unlink this PC." This stops synchronization but does not by itself delete your OneDrive files from Microsoft's servers.
Once you are certain you no longer need OneDrive, you can uninstall it from Windows Settings > Apps > Installed apps > Microsoft OneDrive > Uninstall. I would not delete the old OneDrive folder until you have verified your PC and NAS copies. If you have a large amount of data, keeping the old folder temporarily is a useful safety net.
Btw. note that Windows 11 may have several applications configured to use OneDrive locations automatically. After disconnecting OneDrive, check the locations of your Documents, Pictures, Desktop, and other personal folders under their Properties > Location settings. You want them pointing to local paths such as C:\Users\<username>\Documents, not C:\Users\<username>\OneDrive\Documents.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin