Asset operations such as asset loading should be avoided in InitializeOnLoad methods. InitializeOnLoad methods are called before asset importing is completed and therefore the asset loading can fail resulting in a null object. To do initialization after a domain reload which requires asset operations use the AssetPostprocessor.OnPostProcessAllAssets callback.
Docs: https://docs.unity3d.com/2023.2/Documentation/ScriptReference/InitializeOnLoadAttribute.html