why get_the_post_thumbnail( the_ID()) echos extra post id

I believe because:

the_ID() : Display the ID of the current item in the WordPress Loop.

and

get_the_ID() : Retrieve the ID of the current item in the WordPress
Loop.

So the_ID() displays the post ID.
Try to use get_the_ID()