\(M=\left(\dfrac{\left(\sqrt{a}-1\right)\left(a+\sqrt{a}+1\right)}{\sqrt{a}-1}+\sqrt{a}\right).\dfrac{1}{\sqrt{a}+1}\)
\(=\left(a+\sqrt{a}+1+\sqrt{a}\right).\dfrac{1}{\sqrt{a}+1}=\left(\sqrt{a}+1\right)^2.\dfrac{1}{\sqrt{a}+1}\)
\(=\sqrt{a}+1\)
\(a=2020-2\sqrt{2019}=2019-2\sqrt{2019}+1=\left(\sqrt{2019}-1\right)^2\)
\(\Rightarrow\sqrt{a}=\sqrt{2019}-1\)
\(\Rightarrow M=\sqrt{a}+1=\sqrt{2019}-1+1=\sqrt{2019}\)