How to Get Product type by Product id Magento 2?

Magento 2, Get Product type from the Product id using Product Repository interface.

Magento supports multiple product types include, simple, Bundle, Grouped, Configurable, Virtual, Downloadable, Gift Card(Magento Commerce).

You want to know the product type from the product id, You need to refer below code snippet,

You can get the product type with passing the product id.
$productId = 10;

simple, virtual, downloadable, configurable, bundle or grouped based on the product type.