I have set up a Minecraft server with the official server package from Mojang on my PC. Everyone can find it in my WLAN without any problems, but outside of it they can't be reached. As the IP address, I took the IPv4 address that you get when you use the ipconfig command in CMD. That was 192.168.xxx.xxx, but then I read that several pages can also show you the IP address. But they showed me 217.232.xxx.xxx. Why are they different? Or does ipconfig show me the IP of the router?
Ipconfig shows you the internal IP of the server. The websites will show you your public IP address. You have to enable the port (= 25565) for the Minecraft server on your router so that people outside your LAN can also access. These then also need your public IP. Note: this can change frequently, it's best to get a free DDNS address (for example at https://www.noip.com)
Can the server then also be reached at this DDNS address? As I understand it, it simply assigns a host name to my IP address - so it should go
That's fine. You can also try this, but redirects in this case but is similar to (http://yourcustompage.ddns.net) (points to the server in which a redirect is to https://yourcustom.page)