How to Get Store VAT number Magento 2?

You can get the Store VAT number from the Store configuration section in Magento Admin Panel.

You can retrieve the store Vat number from the admin panel wit below steps,
1. Stores -> Configuration -> General -> General
2. Store Information -> VAT NUMBER.

Get Value of Vat Number Text field from the Above Section.

if the Vat number is set by Admin Team, You can retrieve it otherwise it will be blank.

You can get the VAT Number for the current website by programmatically using the code snippet.

<?php
namespace Jesadiya\VAT\Model;

use Magento\Store\Model\ScopeInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;

class VatNumber
{
    /**
     * Get Vat number path
     */
    const VAT_NUMBER_PATH = 'general/store_information/merchant_vat_number';

    /**
     * @var ScopeConfigInterface
     */
    private $scopeConfig;

    public function __construct(
        ScopeConfigInterface $scopeConfig,
    ) {
        $this->scopeConfig = $scopeConfig;
    }

     /**
     * Get VAT number by website scope
     *
     * @return string
     */
    public function getVatNumberByWebsite(): string
    {
        return $this->scopeConfig->getValue(
            self::VAT_NUMBER_PATH,
            ScopeInterface::SCOPE_WEBSITES
        );
    }
}

general/store_information/merchant_vat_number is the configuration path to retrieve Vat number.
echo $vat = $this->getVatNumberByWebsite();

Output: VAT Number set by admin team.