This depends. Some students’ career plans do not call for graduate school, so undergrad is the only thing they need to consider.
Some kids aspire to PhDs. You don’t pay for those in most instances. You get supported by a teaching or research assistantship (which pays enough to allow you to live in a form of poverty acceptable only to graduate students, but hey, everybody else is doing it, too).
Other kids aspire to law, medical, veterinary, or business school. You do pay for those, and they are staggeringly expensive.
If you have the good fortune that your kid knows which category he/she falls into, that might help with your decisions. Unfortunately, most kids don’t know this at the time when they’re applying to college.