This code below instantiates a prefab that has a sprite, with a 2D light as a child. In the editor, when I manually drag in one of these prefabs, everything works fine. But when the prefab is spawned via code in-game, the prefab is spawned, as confirmed by a Debug.Log, but only the child light is visible, not the parent sprite.
In the image below, the left is when I drag in a prefab. On the Right is the light working, but the sprite not visible. I was thinking this issue might be layers/sorting, but If it all works when dragging it in, would that mean the issue lays elsewhere?
Any help is appreciated!
private void PlayerShoot()
{
GameObject ChosenMuzzleFlash = muzzleFlashArray[Random.Range(0, muzzleFlashArray.Length)];
Quaternion newRotation = Quaternion.LookRotation(muzzleFlashPoint.transform.position, Vector3.up);
var muzzleFlashInstance = Instantiate(ChosenMuzzleFlash, muzzleFlashPoint.transform.position, newRotation);
Debug.Log("Terst" + muzzleFlashInstance.name);
}

Did you open the inspector and try finding the instantiated object? Check for attributes like the scale and make sure that they are correct.
– RLinThe sprite could be hiden by something indeed. Create a new Vector for your position with a bigger z
– dumoulinantoine