4. For each $x$, the function $y$ is
$$
y_{1}=2 x, y_{2}=x+2, y_{3}=-\frac{3}{2} x+12
$$

the minimum of these three functions. Then the maximum value of the function $y$ is ( ).
(A) 4
(B) 6
(C) 8
(D) $\frac{48}{7}$
4.B.

Solving the systems of equations $y_{1} 、 y_{2}, y_{1} 、 y_{3}, y_{2} 、 y_{3}$ yields the intersection points $A(2,4), B\left(\frac{24}{7}, \frac{48}{7}\right), C(4,6)$.

When $x \leqslant 2$, $\min \left\{y_{1}, y_{2}, y_{3}\right\}=y_{1}=2 x \leqslant$ 4, the maximum value is 4;
When $24$ (it seems there is a missing part in the original text, assuming it should be $2 < x \leqslant 4$), $\min \left\{y_{1}, y_{2}, y_{3}\right\}=y_{3}=-\frac{3}{2} x +12<6$.
In summary, the maximum value of the function $y$ is 6.