Follow your program from the shell that starts it through system calls, files, memory and sockets to the service manager, limits and namespaces that run it in production, and know which tool answers which question when something goes wrong.
The examples ran in an Ubuntu 24.04 container (kernel 6.12 under Docker Desktop on a Mac) after apt-get install procps strace iproute2 sysstat dnsutils python3 curl. To follow along, start one with docker run --rm -it --cap-add SYS_PTRACE ubuntu:24.04. PIDs, addresses and timings will differ on your machine. Each topic ends with what is different on macOS.