Let $2^n+2021n = m^2$. Hence $m^2 \equiv 2^n ($mod $ 43)$ and therefore $\left(\frac{2^n}{43} \right)=\left(\frac{2}{43} \right)^n = ((-1)^\frac{43^2-1}{8})^n = (-1)^n = 1$.
So $n$ is even and let $n=2k$. Therefore, the equation rewrites as $4042k=(m-2^k)(m+2^k)$.
However, $(m-2^k)(m+2^k)\ge m+2^k > 2^k$ and if $k\ge16$, then $2^k>4042k$. So $k\le15$ and now it is just a casework.
Case $1$:$k$ is odd. Hence, $m^2=4042k+4^k \equiv 2($mod $4) \Rightarrow $ contradiction.
Case $2$: $k=2$ and $m=90$ is a solution
Case $3$: $k=4$ or $k=6$ or $k=12$ and we get a contradiction (mod $4$)
Case $4$: $k=8$ and we get a contradiction (mod $10$)
Case $5$: $k=10$ and we get a contradiction (mod $3$)
Case $6$: $k=14$ and we get a contradiction (mod $9$)
Finally, the only solution is $n=4$.