Stock android without an unlocked bootloader will not give you access to the hosts file, and there shouldn’t be a firewall you don’t know about. Can you run a vbox or live USB on another machine on your network to see if it will see the server?
I just saw you already answered about the same gateway and mask. Hm. I’m thinking there’s probably a janky setting on your router, that’s the only place I can think of that might have a poorly configured or unconfiugred firewall. Especially if it works on the cellular using the VPN.
Good luck with it, I’m sorry I don’t have the exact answer!
Edit - just saw your edit. Computing is like that sometimes! Glad you got it working. 👍
Sounds like they meant that for chat GPT…