First Open “Validator.php” file located as the following path.
vendor\magento\framework\View\Element\Template\File\Validator.php
find the function :
protected function isPathInDirectories($path, $directories)
Now inside this function find this line of code.
$realPath = $this->fileDriver->getRealPath($path);
And replace this line of code with the below code.
$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
Now compile your Magento by using commands:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:flush