I concur with the other responses that you should not put your computer onto the internet as a server. BUT there is a big difference between that and just making your site available to your phone.
Firstly you must reconfigure your localhosted WordPress website away from using localhost to using a regular website name, for the moment you can just makeup any name, it need not be registered now or ever, if you plan to get the website hosted and accessible on the internet then you could start using that name now (even if you have not registered it yet). For the sake of this demonstration I will use “example.com”
Install and use the plugin DUPLICATOR to prepare your site for this logical (though not physical move), you will not need its help with moving the files, but you will need the modified database it will produce.
Now create a new database with a new name, load the modified database into it, keep the same database user and password. Make a safe copy of your wp-config.php file and change the database name in the working file.
Now reconfigure your web server to use the “Virtual Host” method, details here:
https://httpd.apache.org/docs/2.2/vhosts/
You will have a configuration block that looks like this:
<VirtualHost *:80>
DocumentRoot (whatever path your web server files live at)
ServerName example.com
ServerAlias www.example.com
</VirtualHost>
Now edit your “hosts” file on your PC to instruct your browser to use your localhost webserver when it sees your name, line like:
example.com 127.0.0.1
www.example.com 127.0.0.1
Your website will now operate on your localhost browser as:
https://example.com
Now for your phone, you need the IP address of your PC, available from your network interface properties or using a program like “ipconfig” or “ifconfig”, find the details of your phone’s OS at this page:
https://en.wikipedia.org/wiki/Hosts_%28file%29
And add lines to the “hosts” file like:
example.com (server ip address)
www.example.com (server ip address)
Now you will be able to view and test your webiste from the browser on your phone, but only so long as your phone is on the same LAN as the server.
It would be possible to setup port forwarding and so on in your internet modem/bridge but this is getting far too complex.