You're right on assuming that $p\equiv 3\pmod{4}$ and then trying arrive at a contradiction. Here's how it may work out.
Suppose that $p\equiv 3\pmod{4}$ and $p$ divides $n^2+1.$ If $p$ divides $n^2+1,$ then we have;
$$n^2+1\equiv 0\pmod{p}$$
$$n^2\equiv -1\pmod{p}.$$
Now, since we have assumed that $p\equiv 3\pmod{4}$ we know that $p=4k+3$ for some positive $k.$ Thus, we have;
\begin{align*}
n^{p}
&\equiv n^{4k+3}\pmod{p}\\
&\equiv n\left(n^{4k+2}\right)\pmod{p}\\
&\equiv n\left(n^2\right)^{2k+1}\pmod{p}.
\end{align*}
Note that $n^2\equiv -1\pmod{p},$ so we have;
\begin{align*}
n^{p}
&\equiv n\left(n^2\right)^{2k+1}\pmod{p}\\
&\equiv n\left(-1\right)^{2k+1}\pmod{p}\\
&\equiv n(-1)\pmod{p}\\
&\equiv -n\pmod{p}.
\end{align*}
But by the Fermat's Little Theorem, we have $n^p\equiv n\pmod{p}.$ So we have $n\equiv -n\pmod{p},$ which simplifies to $p\mid 2n.$ However, we can see that this is incorrect as $p$ also divides $n^2+1$ which is coprime to $2n$. So we have finally arrived a contradiction and your claim is proven.
An experimental approach:
Due to a hypothesis by Schintzel for any natural number $s$ , there are infinitely many natural numbers like $n$ such that $n^2+1$ is product of $s$ prime numbers. For example:
$13^2+1=2\cdot 5\cdot 17$
$17^2+1=2\cdot 5\cdot 29$
$23^2+1= 2\cdot 5\cdot 53$
As you see all odd prime factors are ($1\bmod 4$).Also in all examples ($a\equiv \pm 1 mod 4$). This can be considered as the condition for primality of a.
– sirous Apr 27 '22 at 14:40