1) Use preference in di.xml and add new methods or do changes
2) Or create a new class which extends the actual class and attach the new class to your phtml.
Lets suppose you want to extend Magento\Catalog\Block\Product\Listproduct
then you create a class like Vendor\Module\Block\Product\Listproduct
and
change here
<block class="Vendor\Module\Block\Product\Listproduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml">