Make sure the the disk you are writing files to is not full. Free disk space to get some space for recordings.
Make new folder like "D:\OBS" and configure OBS to save recordings to this recently created folder.
Also, for every new release of OBS, Windows may "suspecting" (false positive) that OBS is very strange malicious software, so it may restricts OBS access to certain folders on your PC.