Yes, you can select specific folders, by following the instructions here: https://support.microsoft.com/en-us/office/choose-which-onedrive-folders-to-sync-to-your-computer-98b8b011-8b94-419b-aa95-a14ff2415e85
When it comes to individual files, you have more limited options. There's no way to exclude a file per se, unless you move it out of a folder. But you can control how much space the file will be taking on the device, by selecting "Always keep on this device" or "Free up space", respectively.
If you want to see the option to exclude specific files, best vote it up over at the Feedback portal: https://feedbackportal.microsoft.com/feedback/forum/e3f04660-2c1c-ec11-b6e7-0022481f8472