Where is the flaw in my proof?

You write $1+\frac{1}{n} \approx \frac{\pi(n)}{\pi(n+1)}$, which is equivalent to $$ \lim_{n\to \infty}\frac{1+\frac{1}{n}}{\frac{\pi(n)}{\pi(n+1)}}=1, $$ which is true because both numerator and denominator have limit $1$.


There seems to be a couple of very fundamental flaws with your attempted proof. Flaws that show a deep misunderstanding of how $\pi(x)$ relates to $\mathrm{li}(x) = \frac{x}{\ln x}$.

$\pi(x)$ is the prime counting function and you got the definition of this correct. However, you seem to misunderstand what $\pi(x) \sim \mathrm{li}(x)$ means. By the way, the use of the "approximately equal to" symbol "$\approx$" here is incorrect.

$\pi(x) \sim \mathrm{li}(x)$ is the formal statement that means that $\lim_{x \to \infty} \frac{\pi(x)}{\mathrm{li}(x)} = 1$, and this is called the prime number theorem. This has been proven true. But note that this is only talking about what happens at the limit. It is correct to conclude that as you take prime numbers that are larger and larger, you will find that the ratio of $\frac{\pi(x)}{\mathrm{li}(x)}$ approaches more and more closely to one.

However, note that there is a complicated relationship between $\pi(x)$ and $\mathrm{li}(x)$ for finite values of $x$. For example, for values of $x$ that seem "usefully small" and that we might use in everyday math, $\pi(x) < \mathrm{li}(x)$. But we know that $\pi(x) > \mathrm{li}(x)$ infinitely often, and that this only starts happening with very, very large values of (x) - see Skewes's number. So the prime number theorem doesn't really allow us to draw hard conclusions pertaining to finite ranges of primes, only about the asymptotic behaviour of very large primes. And it does not help us to establish what happens when you're considering a general statement about all primes.

Another step in your "proof" that shows the same lack of understanding about the limits (pun not intended) of the prime number theorem is when you asserted that $\frac{n+1}{n} \sim \frac{\pi(n)}{\pi(n+1)}$ to be a contradiction. In fact, since both sides have a limit as $n \to \infty$ of $1$, the statement is perfectly true (and not a contradiction).

I hope you see why you can't use (at least directly) the prime number theorem for this sort of proof now.