What you're asking for is equivalent to finding an injective function $f:\mathbb R^n\to\mathbb R$ that is monotone in the sense that if $x$ is coordinate-wise at most as big as $y$, then $f(x)\le f(y)$.
As a first step, notice that this is equivalent to finding such a function from $(0,1)^n\to\mathbb (0,1)$.
And this is easy by interleaving the digits of the coordinates of $x$, i.e., if $x=(x^1,x^2,\ldots,x^n)=(0.x^1_1x^1_2\ldots,0.x^2_1x^2_2\ldots,\ldots,0.x^n_1x^n_2\ldots)$, then let $f(x)=0.x^1_1x^2_1\ldots x^n_1x^1_2x^2_2\ldots x^n_2x^1_3x^2_3\ldots x^n_3\ldots$.
This is clearly injective and we prove monotonicity as follows.
If $f(x)>f(y)$, then they differ first at some $x_i^h>y_i^h$ for which $x_j^h=y_j^h$ for all $j<i$.
But then $x^h>y^h$, so $x$ cannot be coordinate-wise at most as big as $y$.
ps. Note that $f$ is almost surjective and almost continuous; the only issue is with numbers that have a finite decimal expansion. To see that an injective $f$ cannot be continuous, consider $f^{-1}(\mathbb R_-)$, $f^{-1}(0)$ and $f^{-1}(\mathbb R_+)$ where wlog. $0$ is an inner point of the image of $f$.
By continuity, these are two open sets and a point, so they cannot form a partition of $\mathbb R^n$ for $n\ge 2$. (Here we didn't even use monotonicity.)
It is, however, possible to make $f$ into a monotone bijection.
This can be achieved as follows.
First we show the statement for $f:[0,1)^n\to [0,1)$.
Write every number in its finite decimal form, if it has one, i.e., it shouldn't end with $999\ldots$.
The number $f(x)$ will start with the first few decimal digits of $x^1$.
If $x^1_1\ne 9$, then $f(x)$ will start with $x^1_1$, and then we take the first few digits of $x^2$.
If $x^1_1=9$ but $x^1_2\ne 9$, then $f(x)$ will start with $x^1_1x^1_2$, and then we go to $x^2$.
And so on, we always go until the first non-$9$ digit of $x^1$ before we start taking digits from $x^2$.
Then we repeat this for $x^2$, then for $x^3$, etc. (in a circular order).
This finishes the construction for $f:[0,1)^n\to [0,1)$.
To make it into a function $\mathbb R^n\to\mathbb R$, just apply a monotone bijection $g:\mathbb Z^n\to\mathbb Z$ to the integer part of the numbers.
(Such a $g$ is easy to construct by induction and by taking larger and larger cubes around the origin, $0^n$.)
Such a $g$ gives a partition of $\mathbb R^n$ into cubes that are isomorphic to $[0,1)^n$.
We can combine $f$ and $g$ to obtain a final function that will map $x$ to $g(\lfloor x\rfloor)+f(x-\lfloor x\rfloor)$.