You cannot selectively choose which pictures sync via iCloud from the library that is set as the system photo library within the Photos app. But you might have some other options.
1) There is a way to bring photos into a library without actually storing them *in* the library. They will still show as thumbnails. The metadata - including adjustments - would all live in the library, but the actual photos would not. Since iCloud can only sync with photos that are stored in the library, it would skip these. So, if you were to do that with your RAW copies, they'd never get uploaded to iCloud. Now, the trick is that to get the JPEG in there, you'd have to export them and import them back in as photos that are stored in the library. Check out this article about how this works. You'd also have to realize that you would have duplicates of your photos as I'm pretty sure that they the JPEG and the RAW versions would not automatically stack like they would normally if they were both actually stored in the same library. And, your RAW files would still have to stay in your file system somewhere, so don't move them or the link to them in the photo library would break and it's a bit of a pain to reconnect them.
https://support.apple.com/guide/photos/change-where-photos-and-videos-are-stored-pht1ed9b966d/mac
2) You could use separate photo libraries but I'm not sure if that works well with your workflow. You'd have one with all the RAW copies and one with the JPEGs that you set as the system photo library for iCloud. But you can't have both libraries open at the same time so there'd be a lot of switching back and forth.