If $Z=F(X)$, then $Z$ has a uniform distribution on $[0,1]$.
I understand the proof using functions, but visually it doesn't make sense.
If $X$ is a normal distribution, then its cdf $F(X)$ looks like:
If we take $Z=F(X)$, $Z$ does not look like a uniform distribution (no flat top, its curved here). What am I missing?

If you transform a random sample by the (continuous) CDF of its population, it becomes standard uniform.
First, I find the notation to be unfortunate and it may be confusing you. Let's say $U = F_X(X) \sim \mathsf{Unif}(0,1),$ for a continuous random variable $X.$
Second, let's investigate a couple of specific examples.
Example 1: Suppose $X = \mathsf{Beta}(2,2),$ with $f_X(x) = 6x(1-x),$ for $0<x<1,$ a parabola. Also, $F_X(x) = 3x^2 - 2x^3.$
We can use R statistical software to sample $n=500$ observations in vector
xfrom $\mathsf{Beta}(2,2).$ in R, the density is denoteddbetaand the CDF is denotedpbeta(each with appropriate parameters).The expression for
uamounts to $u =3x^2 - 2x^3.$A histogram (blue) provides a crude estimate of the corresponding density function (red), and an empirical CDF (ECDF) plot provides an estimate of the corresponding CDF.
An ECDF uses actual data, while a histogram uses binned data (with some loss of information). So ECDFs are ordinarily better estimates of CDFs, than are histograms estimates of densities. The number of observations $n = 500$ is a compromise to get histograms that are not too rough, while getting an ECDF that can (barely) be distinguished from its corresponding CDF.
As you suspected, the 'action' takes place in the ECDF plot. Below we show how nine particular points in
x(out 0f 500) get transformed to appropriate values in 'u'.Example 2: Here is a similar example in which we transform 1000 points 'x' from the distribution \mathsf{Norm}(\mu=100,\sigma=15) to standard uniform by using the CDF of this normal distribution.
Note: In case you are interested in R code for the figures, here is the code for the first two. (The third uses minor modifications of the first.)
[The R procedure
curverequires the argumentx, regardless of what is being plotted.]