\(M=0\Leftrightarrow2x^2+y^2+5+2xy-6x-4y=0\)
\(\Leftrightarrow x^2+y^2+4+2xy-4x-4y+x^2-2x+1=0\)
\(\Leftrightarrow\left(x+y-2\right)^2+\left(x-1\right)^2=0\)
\(\Leftrightarrow\left\{{}\begin{matrix}x+y-2=0\\x-1=0\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}x=1\\y=1\end{matrix}\right.\)
\(\Rightarrow N=\left(2-1\right)^{2018}+\left|1-1\right|^{2019}-\left(1-1\right)^{2020}=1\)