First, let's look at the difference between two scenarios:
Case 1: A box is standing still on an incline.
In this case, the type of motion we are trying to oppose is the box sliding down the incline, i.e. the effect of gravity force on the box. Don't split up the weight into parallel and perpendicular components yet. Draw the normal force and the friction force. Then draw their sum. You can see that their sum is vertical, opposite the direction of the gravity force on the box. If this sum is sufficiently large, it will fully counter the gravity force in the box and prevent it from sliding up or down.
Case 2: A car is moving around a banked road/race track, with no friction (coefficient of friction = 0).
In this case, the types of motion we are trying to oppose is:
- The car sliding down the incline, due to the effect of gravity force on the car.
- The car skidding out of its circular path and off the road.
Again, draw the weight/gravity force on the car without separating it into its components. A vertical force (or vertical sum of forces) in the opposite direction needs to counter this force. What's touching the car (on the outside)? Just the road under it! And there's no friction, so the vertical force can only be the vertical (y) component of the normal force/the force supplied by the road on the car. But we still need a horizontal centripetal force to keep the car in a circular path! Again, the only thing that can supply this horizontal force is the normal force/the road's force on the car. So the normal force must have a horizontal component that provides the necessary centripetal force.
Hopefully, you can see the difference between these two scenarios.
Now let's derive the respective formulas for each of these scenarios.
Draw the vector representing the weight of the box. Split this vector into its parallel and perpendicular components. The normal force counters the perpendicular component, which equals mg * cos(theta), where theta is the angle of the incline. The friction counters the parallel component, which equals mg * sin(theta).
Draw the vector representing the weight of the car (not its components). In this case, we have no friction, so all of the weight of the car (not just the perpendicular component) must be countered by the vertical component of the normal force alone. Thus F_n,y = mg. Using simple geometry, we can find that the angle between the net normal force (by definition, perpendicular to the road) and its vertical component is equal to theta, the angle of the incline. Thus, F_n = mg/cos(theta).
I hope this helps! I was stuck on this too for a while, and I decided I'd jot down the thinking process I went through to clear things up for myself. :)