How do do this!111!

i want to make a fun game party pack!

It is going to have snake! but i dont know how to make it so if i hit a block the snake grows +3 blocks

I made a Snake Game Tutorial

Thank you so much! I subscribed!