You can pin several blocks to some invisible sprite (block base). And then drag&drop that base sprite.
But this is the easiest part. The hard part would be checking if the blocks can fit into the grid.
And for this you should learn how arrays work.
On the second thought, this game can probably be made without the arrays, by using "Is overlapping" events.
As you drag and then drop colored blocks onto the grid, you need to test if each block is overlapping a cell and if that cell is empty (not occupied by another block).