I will trying but its not working ?
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of Object Manager
$currencyModel = $objectManager->create('Magento\Directory\Model\Currency'); // Instance of Currency Model
$price =$block->getProductPrice($_product);
$currencyCode = 'SAR';
$currencySymbol = $currencyModel->load($currencyCode)->getCurrencySymbol();
$precision = 2;
echo $formattedPrice = $currencyModel->format($price, ['symbol' => $currencySymbol, 'precision'=> $precision], true, false);
var_dump($formattedPrice);
?>
How to solve this problams?