For a given permutation $ (x_1,x_2,\ldots,x_n)$ of $(1,2,\ldots,n)$, let $S = \Bigl|\bigl|\ldots \bigl||x_1-x_2|-x_3\bigr|-\ldots - x_{n-1}\bigr| -x_n\Bigr|$.
For $2\leqslant r\leqslant n$, let $S(r) = \Bigl|\bigl|\ldots\bigl||x_1-x_2|-x_3\bigr|-\ldots - x_{r-1}\bigr| -x_r\Bigr|$. Then $S(r) = |S(r-1) - x_r|$, and $S = S(n)$.
An easy proof by induction shows that, for each $r$, $S(r)$ is an integer between $0$ and $n$. In particular, $S$ cannot be greater than $n$.
If $x_r$ is even then $S(r)$ has the same parity as $S(r-1)$, and if $x_r$ is odd then $S(r)$ has the opposite parity to $S(r-1)$. If $n$ is of the form $4k$ or $4k+3$ then the set $\{1,2,3,\ldots,n\}$ contains an even number of odd integers, so $S$ will be even. But if $n$ is of the form $4k+1$ or $4k+2$ then the set $\{1,2,3,\ldots,n\}$ contains an odd number of odd integers, so $S$ will be even. In particular, $1990$ is of the form $4k+2$. It follows that in that case $S$ cannot be greater than $1989$.
With $S$ as above, consider the permutation $\{x_1,x_2,\ldots, x_n,n+2,n+1\}$ of the numbers $(1,2,\ldots,n+2)$, and let $S^{++}$ be the corresponding sum $S^{++} = \Bigl|\bigl|\ldots\bigl||x_1-x_2|-x_3\bigl|-\ldots - (n+2)\bigl| -(n+1)\Bigl|$. Then $$S^{++} = \bigl||S - (n+2)| - (n+1)\bigr| = |n+2-S - (n+1)| = |S - 1|.$$ In particular, if $S=0$ then $S^{++} = 1$; and if $S=1$ then $S^{++} = 0$. Another easy induction proof then shows that if $n$ is of the form $4k+1$ or $4k+2$ then (by choosing the permutation $ (x_1,x_2,\ldots,x_n)$ appropriately) it is possible to get $S=1$. (And if $n$ is of the form $4k$ or $4k+3$ then it is possible to get $S=0$.)
In particular, there is a permutation $(x_1,x_2,\ldots,x_{1989})$ of the numbers $(1,2,\ldots,1989)$ giving $S=1$. The permutation $(x_1,x_2,\ldots,x_{1989},1990)$ of the numbers $(1,2,\ldots,1990)$ then has a corresponding sum $S^+$ satisfying $S^+ = |S - 1990| = |1-1990| = 1989$. Therefore the maximum value of the expression $ \Bigl|\bigl|\ldots\bigl||x_1-x_2|-x_3\bigr|-\ldots - x_{1989}\bigr| -x_{1990}\Bigr|$, where $x_1,x_2,\ldots,x_{1990}$ are distinct natural numbers between $1$ and $1990$, is $1989$.