While dried beans are generally cheaper than canned, the price difference is largely negligible and doesn’t account for the effort needed to cook dried beans.
Some varieties of canned beans are high in sodium, but there are many reduced-sodium or "no salt added" options. Draining the liquid can also reduce the sodium.
Though some evidence indicates dried beans are more nutritious than canned, both offer many health benefits. You'll get those benefits no matter which one you eat.
The processing for canned beans amounts to little more than cooking and flavoring, with many brands’ ingredient lists starting with beans, water, and salt.