Help running power through a switch to a light, but continuing power along the circuit to an outlet
You have it right. I'm assuming you don't want the outlet to be switched. If you run 12/2 as indicated you can make it either a 15amp or 20amp circuit. With 14/2 it can only be 15amp. If the outlet is in a bathroom or kitchen it must be 20 amp and must be GFCI protected.