Assigning a prefab in script inspector doesn't get it actually assigned

I am trying to Instantiate() different prefabs in a runtime, however when trying to do so, I get error UnassignedReferenceException: The variable prefab of Environment has not been assigned, although one of the prefabs is being instantiating successfully.

I’ve double checked that all the prefabs are assigned to the script in the inspector, and after that I assigned the same prefab (the only working one) to all the variables. Now it looks like this
image
When running this script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Environment : MonoBehaviour
{
    public GameObject roadPrefab;
    public GameObject crossRoadPrefab;
    public GameObject emptyTilePrefab;
    public GameObject prefab;

    public int horizontalRoads = 10;
    public int verticalRoads = 10;
    public int mapScale = 100;
    public int roadWidth = 4;

    // Start is called before the first frame update
    void Start()
    {
        //GenerateGrid();

        // roadPrefab
        if (roadPrefab)
        {
            Instantiate(roadPrefab);
        }
        else
        {
            Debug.Log("No roafPrefab");
        }
        // crossRoadPrefab
        if (crossRoadPrefab)
        {
            Instantiate(crossRoadPrefab);
        }
        else
        {
            Debug.Log("No crossRoadPrefab");
        }
        // emptyTilePrefab
        if (emptyTilePrefab)
        {
            Instantiate(emptyTilePrefab);
        }
        else
        {
            Debug.Log("No emptyTilePrefab");
        }
        // prefab
        if (prefab)
        {
            Instantiate(prefab);
        }
        else
        {
            Debug.Log("No prefab");
        }
    }

The output is following: roadPrefab, crossRoadPrefab and prefab are failing, while emptyTilePrefab is getting instantiated successfully.
Does anyone has any ideas on why this happening?

If you assign variables to the script
image
They would be only applied when you creating prefabs in Editor
Assigning them to the script is just saving time for you when you adding it to something. Assigning stuff here doesn’t adding anything to existing prefabs.

You need to make sure that all prefabs who have this script attached have their relative prefabs assigned
image