How can I replace my current header with a new one using code

Please send me your collaborator code and store URL. You can get the collaborator code from Settings > Users and Permissions.