I want to install angular to Debian10, but I have got an error:

Ok, I know the npm version is too old.
So I tried to install the latest npm with
npm install npm@latest -g
command, but I have got same error
I also tried to install npm form npmjs.com with
curl https://www.npmjs.com/install.sh
command (with switches -O -L) , but an XML file with NoSuchKey errorcode had been downloaded.
What do I wrong way? Do I need to run these commands as root or with sudo?
Thank you.

Your npm version is probably fine. But your Node.js version is too old. Go to official node.js website and download a recent version.
You will find here the compatibles versions and for angular & node : https://angular.io/guide/versions