How could I create a game like Tetris?

This question makes no sense, if someone tells you exactly how to 1:1 make a tetrisgame there is no need for you to do so.

Break down everything you need to bitesize chunks.
i.e. what shapes will you need, how to rotate a shape, how to spawn a shape, how to randomize etc.

then find tutorials with google, answerhub/forums untill you gained knowledge of each bitesize chunk.
then make tetris.