Failed to connect to server after 3 attempts

I am trying to make a server for my friends and I. Started adding resources and modding it a little on the localhost. But when I wanted to make in a public server. It didn’t work…

I have everything setup, portforwarded my router and added rules to my firewall. Also edited the server.cfg.
Now every time I try to join the server, it connected and downloads all the resources.
But after that its stuck on “Connecting to server…”, which becomes “Failed to connect to server after 3 attempts” after 3 attempts. The error

Does someone have an idea on how to fix this?

Edit: server does acknowlegde I’m joining