Here’s a decent textbook that covers the software side in aerospace (DO-178):
https://www.amazon.ca/Developing-Safety-Critical-Software-Pr...
You can read up on the system safety side in documents like ARP5754 and ARP4761 and hardware side in DO-254.