Neil O’Brien will serve as a shadow education minister under the new Conservative leader Kemi Badenoch.