WordPress Child Theme PHP Code Change Issues

I understand that parent theme updates are not supposed to affect
child theme modifications, but does that mean that if I have
header.php in my child theme
(wp-content/themes/enlighten-child/header.php), then no parent theme
updates to the header.php will affect my website?

WordPress will always load the Child Theme’s header.php on your site, so theoretically no, it won’t affect you. However there’s no guarantee that the parent theme won’t change something in its header.php and then make changes to other files that depend on that change. If that change isn’t reflected in your child theme’s header then there could be issues.

For example, say the parent theme releases an update that adds a <div> element in header.php which gets closed, with </div>, in footer.php. If you only have a copy of header.php in your child theme then the parent theme’s footer.php will have a closing tag for an element that’s not being opened.

That’s mostly just a hypothetical example of something that could happen, but because of that I suggest checking the release notes for the parent theme before each update to keep an eye out for any changes that could affect child themes.

Does the same apply to modifying widget PHP code?

Depends on the parent theme and what widget you’re talking about. WordPress will only automatically handle child theme inheritance of templates that are part of the template hierarchy as well as a couple of others, like header.php, footer.php, comments.php and searchform.php.

All other code, in functions or template files, requires that the parent theme explicitly support child theming. You will need to ask the parent theme’s developer what is child theme-able if you’re not sure.

If either of the above answers are “yes”, how can I easily benefit
from other enhancements/fixes that come with parent theme updates to
the PHP files with the same names as those I’ve modified, without
losing my changes? I guess I’m wanting to have my changes merged with
those made by the theme vendor, but I expect that’s probably too much
to ask.

If you want to adopt any changes the parent theme makes to files that you have replaced in the child theme (such as the new div example above) you will need to manually incorporate those yourself by copying the new bits into your child theme files, or redoing them.

After activating the child theme, I noticed that some of the
customisations I’d made to the parent theme disappeared. (When I say
“customizations”, I mean changes made via Appearance > Customise >
Header Setting > Header Info Section, for example, not changes to PHP
code.) Is that normal and what parent theme customizations can I
expect to lose when creating/activating a child theme?

Theme mods, which are what changes made in the Customiser are typically saved as, are stored against the active theme regardless of whether it is a parent or child theme. Exactly what customisations you will lose when switching to a child theme depends on the parent theme.

It is theoretically possible to copy the theme mods from a parent theme to a child theme by modifying the database directly though. See the answer to this question for a method for doing this.

I’m currently working on a project where I want customisations made on one child theme to also be applied to other child themes of the same parent when switching themes. This requires me to save customisations as options, rather than theme mods. So if this is what you want it requires the parent theme to work the same way.

I understand that updating a parent theme will not touch the child
theme files, but if I’m not even using a child theme, will updating
the theme via WordPress always replace the header.php file, or will it
only be replaced if the file has changed since what it was when it
came out when the currently installed version was distributed?

All files within a theme will be replaced when the theme is updated, whether or not they were actually changed in the new version. Any new files will also be removed, and any removed files will be re-added. WordPress does not support ‘delta updates’. This is why you will see people being very adamant about not modifying parent themes.