How to make procedual tilemap with tilemap component?

I would like to make a pocedual tilemap. I tried to use the SetTile funciton but it seem nothing happened and I couldn’t see any tile that has set.

    public Tilemap tilemap;
    public TileBase tile;

    // Start is called before the first frame update
    void Start()
    {
        tilemap.SetTile(new Vector3Int(10, 10, 0), tile);
       
        Debug.Log("Start");
    }

TileBase is wrong, it’s just the basclass of Tile.
Use Tile instead.

Anyways: what have you assigend to “tile”.

IMHO if you already have trouble yet with the very first line of code then generating a procedural tilemap (which mostly ends up in a sandbox game) might be too mich for the very beginning.
Please read through some of the Unity docs in regards of Tilemap system.

Maybe some guidelines from the Unity Learn platform.

And maybe some of the parts in my guide might be also helpful

KR