How do I project coloured tiles onto a surface? (C#)

I am working in C# I have a big cube as the ground and a quad with a transparent grid pattern to show the user where each tile should be. I want to allow the user to select a colour and draw with this colour on the grid. Essentially recording the coloured grid in my scripts, but also changing the colour on the cube.

I can code a raycast to the point on the cube and calculate where exactly it hit just fine. But how do I draw coloured tiles onto my cube? I can change it to a quad or whatever that’s fine but I don’t know how to show the user’s tiles they have coloured. I tried this with a separate quad for each tile and then changing the colour of the quad but this is super resource heavy.

The reason your fps goes down so low is because each quads have more faces than you would need. You only need 2 faces per tile, so use a plane instead of the quad for the blue background. There are a few ways to achieve what you are trying, but you could try instantiating planes wherever the player selects on top of the background.

What you need is a voxel grid.

This tutorial extends all the way to drawing on the grid itself in the later parts.