How to bake lighting in a scene opened via scripting?

I’m not the best at Unity so please help me out if you can.
So I made a code in a URP project that opens a game scene from a main menu when you click a button

    public void openGame()
	{
        SceneManager.LoadScene("Game");
	}

The only issue is that when the scene opens, the lighting remains unbaked. Does anybody know how to get the lighting to bake in the Game scene when it opens? Maybe with scripting or a setting in lighting?

You probably want to call Unity - Scripting API: Lightmapping.Bake after loading the scene.

If you are asking about baking at runtime, in a built player, that isn’t currently possible. Scenes must be baked in editor.