This can be tricky but it can be done.
As a quick note, since you’ve got a sizable library and you want to upload everything to iCloud again, make sure your internet provider won’t charge you for using too much data. I know mine has a cap.
Now, onto your main question. If I’m understanding things, you’ve lost confidence in the iCloud copy of your photos and want to start fresh knowing that the copy on your Mac is in good shape. This being the case, you will first need to make a backup copy of your photo library. This is just in case something goes wrong. Then you will need to create a new empty library and set it as your System Photo Library for iCloud in the Photos preferences dialog. This will start downloading the photos from iCloud but we’re not going to let that finish. Next, you will need to delete all of the photos from iCloud using a browser like Safari at iCloud.com. Just log in to iCloud, go to Photos and start deleting everything. Don’t do anything with Shared Albums.
At this point, you will have, 1) your original library with all of your photos which has been decoupled from iCloud, 2) a backup of that in case anything goes wrong, and 3) an empty photo library that is synced to iCloud which should also be empty.
So the next step will be to re-establish your original library as the System Photo Library. So open your original library and set it as your System Library in the Photos preferences dialog. You will also need to ensure that the photo syncing option is turned on since it is currently only set to Shared Albums. This will allow the full library on your Mac to sync to iCloud and all should then be good.
Once you’ve confirmed this worked properly, you could delete your backup copy of your photo library.