I use icanhazip.com myself - simple as :
curl icanhazip.com
╭─x@titan ~
╰─➤ curl icanhazip.com
x.x.x.x
Furphied :
╭─x@titan ~
╰─➤ curl icanhazip.com
222.9.249.66
(that’s not my real external IP address)
I too use DDNS (NoIP) so I can get to my home LAN (openvpn and SSH on non-default port 22 to my Raspberry Pi4) without knowing what my dynamic internet service provider “provided” external IP address is. This bears NO relation to the “private” IP addresses used on my home network (other than I set my router to forward or “NAT” external requests to devices on my LAN).