wp_mail
uses php mail()
function, which does not work on localhost. Since SMTP server does not exist on localhost.
For mail()
to work on localhost you’ll have to setup SMTP on your local server.
Or use some SMTP plugin which will bypass `mail()’ and connect to SMTP.