The oil giant’s profits were down from 2022 but up on the previous quarter due to higher refining margins.