I'll post the answer for both phtml and html files.
Overriding phtml files
For example if you want to override site_name/vendor/magento/module-checkout/view/frontend/templates/cart/shipping.phtml
, you will need to put it under /site_name/app/design/frontend/ThemeName/default/Magento_Checkout/templates/cart/shipping.phtml
Overriding (KO) html files
For example if you want to override /site_name/vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html
, you will need to put it under/site_name/app/design/frontend/ThemeName/default/Magento_Checkout/web/template/summary/cart-items.html
Now html pages can be a hassle, you need to make sure the caches from your browser are cleared. If you're using the latest google chrome you can inspect element go to network tab and then tick disable caches, reload the page. Reason for this is that HTML pages are more cacheable. If this does not work clear you pub/static/frontend
folder.
app\design\frontend\Magento\luma\Magento_Theme\templates\root.phtml
Home Page Why?