I want to override grid.phtml in custome module without using preference.I have tried this link but it does not work for me.
widget.xml
<?xml version="1.0" encoding="UTF-8"?>
<widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Widget:etc/widget_file.xsd">
<widget id="products_list">
<parameters>
<parameter name="template" xsi:type="select">
<options>
<option name="grid" value="Vendor_Module::product/widget/content/grid.phtml">
<label translate="true">Products Grid Template</label>
</option>
</options>
</parameter>
</parameters>
<containers>
<container name="content">
<template name="grid" value="grid" />
</container>
<container name="content.top">
<template name="grid" value="grid" />
</container>
<container name="content.bottom">
<template name="grid" value="grid" />
</container>
</containers>
</widget>
</widgets>