Magento 2: How to send emails from localhost?

You can use the SMTP for this. And for SMTP configuration you can use any extension.

https://github.com/emizentech/custom-smtp-magento2

From this extension you can configure your SMTP detail in admin and based on that you can send email from local system


If highest voted answer's repo doesn't show up than you can use below free extension by MagePlaza to send emails on xampp.

https://www.mageplaza.com/magento-2-smtp/