ipconfig prints a wall of text with every adapter, including the ones you do not care about. PowerShell can give a table with just the addresses.
Get-NetIPAddress -AddressFamily IPv4 | Format-Table InterfaceAlias, IPAddress, PrefixLength
The cmdlet gets the IP address configuration: IPv4 addresses, IPv6 addresses and the interfaces they belong to. The -AddressFamily parameter takes IPv4 or IPv6 and returns only matching entries. The Format-Table part keeps three columns: the adapter name, the address and the prefix length.
With a bit more PowerShell you can leave out the loopback address and the self-assigned ones, which makes the answer even shorter:
Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.IPAddress -notlike '127.*' -and $_.IPAddress -notlike '169.254.*' } | Select-Object InterfaceAlias, IPAddress
The prefix length is the number after the slash in a notation like 192.168.1.20/24, so you see the network size without decoding a subnet mask.
The caveat is that the cmdlet is part of the NetTCPIP module, which ships with Windows. A Microsoft article that uses it warns that some commands do not work in the older PowerShell that comes with Windows Server, and suggests PowerShell 7 instead. It also only shows addresses on this machine. For the public address as the internet sees it, you need to ask an outside service.
Further reading: Microsoft Learn: Get-NetIPAddress