Status code 204 for matomo.php tracking file

If you prefer getting HTTP 200 instead of HTTP 204, use an image instead of nothing in the HTTP API. See there for the send_image parameter.

For the tracking issue, maybe your browser sends a DNT HTTP header parameter, then Matomo does not track it. Try with another browser and/or configure this in Matomo:
https://fr.matomo.org/docs/privacy-how-to/#step-4-respect-donottrack-preference