The function $y = |x|$ is not a differentiable function from $\mathbb{R} \rightarrow \mathbb{R}$. But considering the graph of $y = |x|$ as a subspace of $\mathbb{R}^2$, we can endow this space with a smooth structure consisting of the single smooth chart which projects the graph down to the x-axis.
What I am confused about is how to reconcile these two seemingly inconsistent viewpoints. Can someone explain why $y = |x|$ is not a smooth function yet it can be made into a smooth manifold?