I've used a few different types of products over the years.
Rubberized undercoating by the gallon is good for a new vehicle that doesn't have any rust underneath because it can absorb impacts from rocks and also rounds off sharp sheet metal edges. I found that areas directly behind the wheels of the vehicle tend to wear through and need to be touched up every spring. My truck had a good quality job done before I bought it and it has added years to the life of the truck by preventing premature cab rot.
Parafin wax undercoating is an interesting product because it never fully cures and will be absorbed by surface rust or even dust on the surface of the sheet metal. You can buy it in pure wax (clear amber color) form or mixed with some petroleum solids (black). The clear amber version isn't very durable bit can saturate rust pitting and displace moisture inside the walls or other places not exposed directly to the road blast. The black stuff works well for exposed areas that are starting to get surface rust.
Another product is fluid film. You can buy it in a spray can or by the gallon. Its found everywhere here in canada, not sure about the states. Its a silicone based spray lube product. This is what I used to shoot inside drain holes to get to places I can't see. It works, and it works well. It will creep across a clean or pitted surface, uphill or downhill. I try to spray this in our vehicles at least once a year to prevent rust from ever starting. Works very well for wheel arches and lower door edges. I even sprayed the inside of the roofline and found it seeping out the seam joint a few days later. Its still seeps out a few years later.
One experiment I tried was to mix some used engine oil with that ashphalt enhanced parafin wax undercoating. I used this to completely coat the inside of a new aftermarket door on the driver's side of my truck. The idea was to pour it into the crimp seams and seal them off for all of eternaty, then spray the rest for good measure. That door is a little heavier now
One word of caution on spray can undercoatings. They are usually prone to drying out and cracking like the dried up mud of a river bed. This provides a strait shot for the road salt to get right to the metal. Use only OEM quality undercoating that usually is bought by the gallon and applied with a special spray gun. To cover the whole truck you will need that much anyway. Generally it costs me around $50 for one gallon of the stuff but I think its well worth it.