How Magento send Order, shipment, invoice and creditmemo emails in Magento 2?

How Magento Send Order Related Emails or Flow of the Order Sender Mail?

Magento sends order-related emails after the order performs an action like Place order, generate Invoice, generate shipment, and credit memo.

Magento_Sales module used for sending Order related emails to the customer.
You can start debugging from the Respective PHP class for the specific email in Magento 2.

Sends order email to the customer from,
Magento/Sales/Model/Order/Email/Sender/OrderSender.php

Sends order shipment email to the customer from,
Magento/Sales/Model/Shipment/Email/Sender/EmailSender.php

Sends order invoice email to the customer from,
Magento/Sales/Model/Order/Invoice/Sender/EmailSender.php

Sends order credit memo email to the customer from,
Magento/Sales/Model/Order/Creditmemo/Sender/EmailSender.php

Each of the above files contains the send() method to send Magento Order related email.