Hide fields on the user profile page with preprocess function
You do not need to use any preprocess functions tbh :> its pretty simple
Go to Home » Administration » Configuration » People » Account settings » Manage Display , History -> Format  chose hidden.