How to override Customer form/login.phtml file to custom module in magento 2?

We can override form/login.phtml file by just copy login.phtml file to our theme level easily without any code customization. login.phtml file contains the code of login form of site,They contain email and password field.

For custom module requirement, we need to overwrite login.phtml file in module level so we need to create customer_account_login.xml file.
Create XML file at app/code/Rbj/Customer/view/frontend/layout/customer_account_login.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_form_login">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Rbj_Customer::form/login.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

Now keep our login.phtml file at app/code/Rbj/Customer/view/frontend/templates/form/login.phtml
Keep content from core login.phtml file to our custom file.
Run command,
php bin/magento cache:clean

Open link, {YOUR_SITE_URL}/customer/account/login
You can get your override file changes.

How to override cart/item/default.phtml in Magento 2?

For override default.phtml file in Magento 2, We need to create the plugin for it. We need to override Magento\Checkout\Block\Cart\AbstractCart Block file to override default.phtml in the module.
create the file at the location in your module.

I have created a module with Rbj/CartItem as {Namespace/Modulename},
app/code/Rbj/CartItem/etc/di.xml file,

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- override cart/item/default.phtml file -->
    <type name="Magento\Checkout\Block\Cart\AbstractCart">
        <plugin name="item-test" type="Rbj\CartItem\Plugin\Cart\AbstractCart" sortOrder="1"/>
    </type>
</config>

Create plugin file at below location in your module,
app/code/Rbj/CartItem/Plugin/Cart/AbstractCart.php

<?php
namespace Rbj\CartItem\Plugin\Cart;
class AbstractCart
{
    /*
    *   Override cart/item/default.phtml file
    *   \Magento\Checkout\Block\Cart\AbstractCart $subject
    *   $result
    */
    public function afterGetItemRenderer(\Magento\Checkout\Block\Cart\AbstractCart $subject, $result)
    {
        $result->setTemplate('Rbj_CartItem::cart/item/default.phtml');
        return $result;
    }
}

Create template file in your module view folder,
app/code/Rbj/CartItem/view/frontend/templates/cart/item/default.phtml
Keep your content in default.phtml file to override Cart module default template.

How to override magento 2 order/items/renderer/default.phtml?

We can override default.phtml file using below way,
Create sales_order_item_renderers.xml in your module layout folder,
File path will be in your module,
app/code/Rbj/Training/view/frontend/layout/sales_order_item_renderers.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="sales.order.items.renderers">
            <block class="Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer"
                   name="sales.order.items.renderer.default.configurable" as="configurable"
                   template="Rbj_Training::order/items/renderer/default.phtml"/>
            <block class="Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer"
                   name="sales.order.items.renderer.default.simple" as="simple"
                   template="Rbj_Training::order/items/renderer/default.phtml"/>
            <block class="Magento\Downloadable\Block\Sales\Order\Item\Renderer\Downloadable"
                   name="sales.order.items.renderer.downloadable" as="downloadable"
                   template="Rbj_Training::order/items/renderer/default.phtml"/>
            <block class="Magento\Bundle\Block\Sales\Order\Items\Renderer"
                   name="sales.order.items.renderers.bundle" as="bundle"
                   template="Rbj_Training::order/items/renderer/bundle/renderer.phtml"/>
            <block class="Magento\GroupedProduct\Block\Order\Item\Renderer\Grouped"
                   name="sales.order.items.renderers.grouped" as="grouped"
                   template="Rbj_Training::order/items/renderer/default.phtml"/>
        </referenceBlock>
    </body>
</page>

Replace Rbj_Training with your actual module name.

Clear Cache and check your file will be overridden.