Magento 2: Override addtocart.phtml file.

Add to cart button in product page coming from Catalog module with product/view/addtocart.phtml template file.
If you want to customization on addtocart template file in Magento 2, You can override addtocart.phtml file in your module by below way,

Create the catalog_product_view.xml file in your module,
Path: app/code/{VendorName}/{PackageName}/view/frontend/layout/catalog_product_view.xml

product.info.addtocart and product.info.addtocart.additional block contains the addtocart template file.

Now you have to create template file addtocart.phtml in your module at below location,
app/code/{VendorName}/{PackageName}/view/frontend/templates/product/view/addtocart.phtml

copy the clone of template from Core Catalog module’s addtocart.phtml file and do your customization.