How to Retrieve list of Product attribute groups Magento 2?

Product attribute groups used to manage multiple Product attributes to specific Groups in creating or update Products in the Magento admin panel.

Get a list of Product attribute groups programmatically in Magento 2 using Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface.

Magento stores the Product attribute group in the eav_attribute_group database table. When you access this table you can find out the information about the attribute group.

If you want to retrieve all the attribute groups, First create SearchCriteria Builder Object and assigned the object to the getList() method from the above interface.

Call from the template or any PHP class,
echo $countryName = $this->getAttributeGroupList();