You cann’t receive WebHooks to localhost.
As Localhost to Twitch, is Twitch, not you.
If you can only work on localhost then you can either long poll the API, or determine a way to receive webhooks.
That could be via NGROK to handle the firewall bypass or you need to host your solution on a server/cloud solution.