Get first URL from custom field, download and set as featured image on post publish

You can access custom fields like that:

 get_post_meta($post_id, $key, $single);

see https://codex.wordpress.org/Custom_Fields

you could extent some of the plugins that already solve the rest of your problem like the wp-autoset-featured-image-plus plugin and tell it to use the string from your custom field instead of the post body.

the relevant code part should be this line in the function wpasfip_post_thumbnail_html:

preg_match_all( '/<img .*?(?=src)src=\"([^\"]+)\"/si', strtolower($post->post_content), $allpics );

i guess if you just replace $post->post_content whith the string from your custom field it should work.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)