What I do is that I create an image field. I use “Featured Image” as the field label and “_thumbnail_id” as the field name. Then in the settings for the field group I hide the WP featured image box. When adding an image this way it automatically becomes the featured image without any coding. You can either get the image using ACF functions or the WP functions that deal with the featured image.