Webhooks: What Am I Doing Wrong? PHP

Correct! Your code is not always running, because php is also not always running. Your webserver is always running though. When your website receives information from a client (in this case Twitch), it “turns on” php, and php runs your code. When php finishes running your code, it “turns off”.