Method 1: By “case” definition of $|x|$ i.e. $|x| = x$ when $x\geq 0$ and $-x$ when $x <0$
So, here, $f(x) = (x-2)$ when $x-2 \geq 0 $ i.e. $x \geq 2$ and $-(x-2)$ when $x-2 < 0$ i.e. $x < 2$
Since, $f$ is defined for both $x \geq 2$ and $x < 2,$ it means it covers the whole real line assuming that $x \in \mathbb{R}$
hence, domain(f) = $(-\infty,\infty)$
Method 2: Using another definition of $|x|$ i.e.
$$|x| = \sqrt{x^2}$$
So, here, $f(x) = \sqrt{(x-2)^2}$ Since we can take any real value of $x$ because $(x-2)^2$ will always be non-negative and squar root is defined for non-negative real values to give a real value.
Method 3: By making graph of $|x-2|$
Just make the graph of $|x|$ and shift two unit right side because we can transform $f(x)$ to $f(x-a)$ by shifting $a$ unit right where $a>0$ and since we are shifting $|x|$ graph here, so domain($|x|$)= domain($|x-2|$) = $(-\infty,\infty)$