Defining a piecewise function using restricted operations
Let's do algebra on functions, by defining for functions $f$ and $g$, $(f+g)(x) = f(x) + g(x)$, and so on with other operators.
Note that $f$ is not a continuous function. However, $+$, $-$, $\times$, $|\dots|$, $\max$ and $\min$ all produces continuous function if you provide them continuous function. Since all you base functions, $x \mapsto x$ and the constant functions $x \mapsto c$, are continuous on $\mathbb R$, you won't be able to create a non-continous function with finitely many operators.
That leaves only the division $\frac{\dots}{\dots}$, which is continuous on $\mathbb R \setminus \{ 0 \}$. However it is undefined on $0$, which means that either you would be left with undefined values, which you cannot since $f$ is defined everywhere, or your denominator is guaranteed to be all positive (or all negative) and the division will operate only on a fully continuous component and your result will again be continuous.
On $\mathbb R$, your problem cannot be solved with finitely many operations of $+$, $-$, $\times$, $\frac{\dots}{\dots}$, $|\dots|$, $\max$ and $\min$.
Following Lærne's answer, I would like to elucubrate on how the problem coould be solved with infinite operations.
Let then define $$ g(x) = \max (0, - \vert x \vert +1)$$ This is a "tent" function, that equals $0$ if $\vert x \vert > 1$, and equals $1$ for $x = 0$, being continuous and piecewise linear.
An approximation to the function $f$ indicated by the OP can be built to any degree of accuracy as $$f(x) \approx g(x)^n $$ (intuitively speaking, where $f(x) = 0$ or $f(x) = 1$ nothing happens upon multypling, while for any $x : 1 < g(x) < 1 , \,\,\, g(x)^k < g(x)^j $ when $ k > j$)
Fellow Mathstackexchangers more versed on convergence issues could maybe formalise the limiting operation. I believe $g^n \to f$ pointwise as $n \to \infty$.