magento 2 in $block->getProductById code example
Example: magento 2 get loaded product by id
$om = \Magento\Framework\App\ObjectManager::getInstance();
$product = $om->create('Magento\Catalog\Model\Product')->load($id);
$om = \Magento\Framework\App\ObjectManager::getInstance();
$product = $om->create('Magento\Catalog\Model\Product')->load($id);