Sorry if the question is too vague or if the examples I look for are too boringly well-known: my knowledge of analytic number theory is rather primitive......
So, here it goes: suppose that you want to prove that the set $\Sigma$ of primes satisfying a certain condition $C$ is infinite. Then you may attempt to compute the density $$ \delta(C)=\lim_{x\to\infty}\frac{|\text{$p\leq x$ such that $C(p)$ holds}|}{|p\leq x|}. $$ If $\delta$ turns out to be positive, you're done. But it could as well be that $\delta=0$ and yet $\Sigma$ be infinite.
My questions are: (1) what are the main known examples of this occurrence? (2) in these examples, if any, the proofs of the infiniteness of $\Sigma$ did use ad hoc case-by-case "tricks" or there are somewhat standard techniques than can be employed with the situation? (3) there is a standard reference?