You can check on the website: IPbyNet
Simply can check your public IP on the website through your browser.
Use CURL on the terminal.
curl ipby.net
It just works on your browser or computer, and just gets IP information from ipify.
It no collects any of your data, please keep your privacy.