There is no general method for your problem. Indeed the problem whether a CFG accepts all strings is undecidable. However you can always try to find a formal proof.
Assume you want to prove that the grammar $G$
$$ S\to aSb \mid \varepsilon$$
generates the language $L= \{a^nb^n \mid n\ge0\}$. Then you have to show that (1) every string $a^kb^k\in L$ can be derived from $G$, and (2) every $w \in L(G)$ has the form $a^kb^k$.
Both statements are not difficult to prove. For example to show (1) you can argue as follows. If we apply the $S \to aSb$ rule $k$ times, then we get the string $a^kSb^k$. After substituting $S$ with $\varepsilon$ we obtain $a^kb^k$.