You could try doing something like this in
app/code///view/frontend/layout/default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="main.content">
<block name="my.block" template="<Vendor>_<Module>::myblock.phtml">
<arguments>
<argument name="view_model" xsi:type="object"><Vendor>\<Module>\ViewModel\MyBlock</argument>
</arguments>
</block>
</referenceContainer>
</body>
But this method implies that you use a view model instead of a block class, which is a better way of rendering something on the frontend.
Also, on line 4 you need to reference a container or block where you want to put your template. You can see a full list of containers and blocks in vendor/magento/module-theme/view/frontend/layout/default.xml