EndNote Library should be saved on the hard drive (eg C:\) and not network drives (eg H:\ or I:\) or the cloud (eg OneDrive, Google Drive, Drop box). If sync is turned on (cloud icon on bottom right hand corner of the task bar), one option is to create a new folder on the hard drive to store EndNote Libraries that OneDrive won't synchronise.
By placing your EndNote library in this separate folder outside of OneDrive, it won't synchronize with OneDrive. Be sure to keep backups as needed since EndNote libraries are not backed up automatically.