Before we look for solutions let us quickly check based on modular arithmetic.
Looking at mod 3 we have 2022 is 2 mod 4.
Solution may exist.
Let us check based on mod 3.
We have
$2022 \equiv 0 \pmod 3$
But $2022 \equiv 6 \pmod 9$
So 2022 is not sum of 2 perfects squares
Let us prove the basis of the same
x is of the form $3a$ or $3a+1 or $3a+2$
If $x \equiv 0 \pmod 3$ then $x^2 \equiv 0 \pmod 3$
If $x \equiv 1 \pmod 3$ then $x^2 \equiv 1 \pmod 3$
If $x \equiv 2 \pmod 3$ then $x^2 \equiv 1 \pmod 3$
Similarly for y
Now looking at above we have $x^2+y^2 \equiv 0 \pmod 3 $ iff $x \equiv 0 \pmod 3$ and $y \equiv 0 \pmod 3$.
So x = 3a and y = 3b for some a and b
or $x^2+y^2 = 9(a^2+b^2)$ or divisible by 9
But 2022 is not divisible by 9
Hence no solution