There are two ways to set a blocks template. Either in the block using
$this->setTemplate('Vendor_Module::template.phtml');
or in layout
<block class="Vendor\Module\Block\BlockName" name="myblock"template="Vendor_Module::template.phtml"/>
Which way would be the best way to set a blocks template or what are the advantages/disadvantages of both?