Answer
$y=-|x|+2$.
Work Step by Step
The absolute value functions have the form $y=a|x-b|+c$ where $(b,c)$ is the vertex of the function.
Hence, because the vertex is at $(0,2)$, $y=a|x|+2$.
Since $(-2,0)$ is on the function, plugging in the values we get: $0=a|-2|+2|\\0=2a+2\\\\-2=2a\\a=-1$.
Thus $y=-|x|+2$.