I have installed one custom module using composer as usually that module was installed in vendor directory is there any way to override phtml file in the same module like name but on app/code
module install path -
vendor/vendorname/module/view/frontend/templates/product/view/addtocart.phtml
App path -
app/code/Vendorname/Module/view/frontend/templates/product/view/addtocart.phtml
Is there is any best possible way to override that and use the custom template file that resides in the app/code with the same vendor module ? just like we override the module file in the custom theme.