Can someone help me understand this case regarding the work done by normal force? I’ve encountered this problem in Giancoli Physics practice problems, and I can’t seem to understand why the normal force does zero work despite that there is vertical displacement as the cart moves up the ramp.
I attach below the problem with the free body diagram associated with it.
Your help is highly appreciated, thanks in advance.

 A: The work done by a force is defined as a scalar product of force and displacement vectors:
$$\boxed{W = \int \vec{F} \cdot d\vec{x}}$$
The scalar product between two vectors is defined as
$$\vec{a} \cdot \vec{b} = |\vec{a}| |\vec{b}| \cos\alpha = a_i b_i + a_j b_j$$
where $\alpha$ is angle between the two vectors.
Since normal force is always perpendicular to the displacement (motion), the scalar product will be zero and the work done by normal force is zero.
To show this mathematically, you first need to setup a coordinate system. Remember that you can define the coordinate system in any way you want, as long as axis are perpendicular. In your example the coordinate system is defined such that normal force lies along $\hat{\jmath}$ axis and motion happens along $\hat{\imath}$ axis, hence the scalar product is zero:
$$(1\hat{\imath} + 0\hat{\jmath}) \cdot (0\hat{\imath} + 1\hat{\jmath}) = 1 \cdot 0 + 0 \cdot 1 = 0$$
You could also define the coordinate system such that gravitational force lies along $\hat{\jmath}$ axis in which case both displacement and normal force would have both $\hat{\imath}$ and $\hat{\jmath}$ components. However, their scalar product would still be zero! Try to solve your example for this coordinate system. You don’t even have to include forces in the calculation, just do the scalar product with unit vectors for displacement and normal force.
