Replace “get_the_post_thumbnail_url()” with below
wp_get_attachment_image_src( get_post_thumbnail_id( $posts->ID ),"thumbnail")[0];
OR
get_the_post_thumbnail_url(get_the_ID(),"thumbnail");
Replace “get_the_post_thumbnail_url()” with below
wp_get_attachment_image_src( get_post_thumbnail_id( $posts->ID ),"thumbnail")[0];
OR
get_the_post_thumbnail_url(get_the_ID(),"thumbnail");