EndeavourOS, by default, installs and enables a firewall.
If you have an active firewall running on the “host” machine, you will need to open port 5900.
Look into how you open a port in firewalld
https://discovery.endeavouros.com/applications/firewalld/2022/03/
Here is a recent example:
I don’t use firewalld myself so I’m afraid I couldn’t be of much more help than this.
Good luck!