How to retrieve the post featured image (thumbnail) ID in Gutenberg blocks?

I think you’re looking for:

const featuredImageId = wp.data.select( 'core/editor' )
    .getEditedPostAttribute( 'featured_media' );

to get the ID of the featured image and then for the corresponding media object:

const media = featuredImageId 
    ? wp.data.select( 'core').getMedia( featuredImageId ) 
    : null;

See e.g. here in the post featured image component:

https://github.com/WordPress/gutenberg/blob/57c2ab37a872b63de215205458336b7fd6c9739d/packages/editor/src/components/post-featured-image/index.js#L105