How to get Attribute id by product id Magento 2?

Get Attribute ids by the Product id in Magento 2 using Attribute Set Finder Interface.

Full Path of Interface:

Get attribute set ids by product ids using method name findAttributeSetIdsByProductIds(array $productIds).  Pass Array of ids to fetch attribute id using the method.

Now If you want to find product id for the only single product,
You have to set SKU as array,
$sku = [’24-MB01′];
$result = $this->getAttributeIdbyProductIds($sku);

Array of attribute id of the product.