How can I fill the screen with cubes?

Hi, I want to fill the screen with cubes, all of the same size, determined by the number of cubes that I want to exist, obviously, the margins are not a problem, but what I’ve done just not work, can anyone help me? Thanks.

public void Start() {
var cam = Camera.main.gameObject;

        var cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
        cube.transform.position = cam.transform.position + cam.transform.forward*1.5f;
        cube.transform.rotation = cam.transform.rotation;
        cube.transform.localScale = new Vector3(100, 100, 1);

this should fill your screen with 1 cube.

**edit: ** to fill your screen with cubes, you’d need to tell us if your camera set to orthographic projection or perspective.
if you are talking about cubes or squares. world elements or ui elements

it would be nice if you’d show what you’ve tried, maybe it is not that wrong and one could help you to make it working.