How would I add layers under my game's terrain generation

I’m making a voxel terrain generation system for fun, I used a tutorial to add a basic perlin noise system. It works so far, but the only block I have is grass, and it looks really weird seeing grass under grass. How would I add dirt under the generated grass?

When you generate a block, check if there’s block in the above cell by checking if its density is big enough. If it there isn’t a block above, the material should be grass, and if there is, it should be dirt.