When I read it for the first time, I found the whole slog towards proving the Prime Number Theorem and the final success to be magnificent. So I am curious about more general results.

We talk of complex $\zeta$-functions and $L$-functions. As a preliminary list, we fix the following list. But feel free to add to it.

$1$. Riemann $\zeta$-function.

$2$. Dedekind $\zeta$-function for a number field.

$3$. Artin $L$-functions for a character of the Galois group of some number field.

$4$. Zeta functions of algebraic varieties over number fields; for getting analytic continuation up to $s = 0$, we for instance fix the zeta function of an elliptic curve defined over $\mathbb{Q}$ which is modular in the sense of Eichler-Shiumura.

I am worried about $4$ here, since the requirement that the zeta function has a pole at $s=1$ is not fulfilled, and thus we fail to capture the main term from the residue there. Is something possible in this case? If so, we can consider that and also more general zeta functions of algebraic varieties over any finitely generated field, zeta functions of Galois representations, etc.. which have analytic continuation up to $s=0$ and the question could be extended to those cases as well.

We have the original prime number theorem, in the following form,

$\pi (x) = \frac{x}{log x} + O(error\ term)$.

which is proved by integration of the Riemann zeta function along a rectangular contour including $s = 1$, and letting the vertical edges get longer and longer, and estimating the integrals. The reference I have in mind is Ram Murty, Problems in Analytic Number Theory, or, J. Ayoub's book.

Now the questions:

What is the known about a similar prime number theorem for more general zeta and $L$-functions?

I could imagine that it will be pretty straightforward for the Dedekind zeta function. But then I am curious about the error term.

For the rest of the cases, does a similar proof of the PNT carry over? More importantly,

What is the "meaning" of the prime number theorem in these general cases?

Finally,

What are some applications(to other problems) of such a prime number theorem proved with a good error term?

The applications of the original PNT are of course well-known, as for instance given in the books of Titchmarsch and Heath-Brown, or Ivic, or in the more modern book of Iwaniec and Kowalski.