From what you write it does appear the link between your OneDrive and the Samsung phone has been interrupted in some way via the cleaning up you've performed.
Before doing anything I would look in any relevant Recycle Bins and restore what you can to see if that helps.
There are some help links via a Google Search to which I'll add some here, although I'd suggest to take a look yourself too.
To add before you possibly action anything more aggressive I would suggest to back up your phone's Gallery to another vault such as Dropbox, just incase anything negative happens which can endanger your photo's on the phone.
I wish you all the best with this.
Daily Driver > Samsung Galaxy s²² Ultra 256Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help. " This is the way. "
I had the same issues, on a S22 Ultra, the only way I found to fix it was doing this and using OneDrive to Sync rather than Gallery :