It is not possible to change which properties appear next to the photo on a contact or company record.
When viewing a contact record, you will be able to quickly see the contact's First Name, Last Name, Job Title and associated Company next to the contact photo if there are values for those fields (or email address if first name and last name are missing.)
You can click the pencil icon in this section to edit the contact's First Name, Last Name, and/or Job Title properties.
When viewing a company record, you will be able to see the Account Name and Company Domain Name in this section (if there is a value for the domain property). Similarly to the animation above, you can click the pencil icon to edit the Account Name or Company Domain Name property.