Shell delivered a record $40 billion profit in 2022, the energy giant said on Thursday, capping a tumultuous year in which…