Get base URL and current URL in the template file

$block->getUrl('hello/test');
$block->getBaseUrl();