Modern trucks don't use cobalt batteries. LFP are better for that workload as they can be cycled much deeper (making up almost all the weight difference when just looking at nominal capacity) and are substantially safer and actually somewhat cheaper than the NMC chemistry that uses the cobalt.
And lithium itself is not nearly that rare.