Bad or broken ground wires are a huge culprit in diesel truck electrical issues. You can check around the battery and look for a broken wire — or one that has slipped loose or never even hooked up in the first place.
If you don't find any issues, take a little bit of time and clean all the ground wires you see until you're sure the connection between wire and battery is good.
Ground wires corrode and get weaker over time. Often, people replace their battery but not the wires. This is essentially asking old wires to work like new, which they can't do and might be the cause of your electrical problems.
Your fuse box should probably be the first place you check when having electrical problems. Additionally, if you take the panel off and look up, you'll see the gem module behind the fuse box. If you check both of these and you're still having problems, you'll likely need a deeper diagnostics check.
Aftermarket accessories are often the cause of electrical issues in diesel trucks. Installations can be sloppy and cause shorts within your system that affect other areas of the truck.