Try This code
<?php
namespace Vendorename\Modulename\Helper;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\ScopeInterface;
class Data extends AbstractHelper
{
const XML_PATH_ENABLE = 'sectionname/groupname/fieldname';
protected $_scopeConfig;
public function __construct(
....................................
ScopeConfigInterface $scopeConfig,
....................................
) {
....................................
$this->_scopeConfig = $scopeConfig;
....................................
}
public function isEnabled()
{
return $this->_scopeConfig->getValue(self::XML_PATH_ENABLE, ScopeInterface::SCOPE_STORE);
}
}