LEGO SpongeBob

You may be looking for Lego SpongeBob (Spin Offs)

LEGO SpongeBob is a SpongeBob SquarePants episode from Season 7. In the episode, SpongeBob and Patrick get addicted to playing with LEGO, before they are attacked by giant LEGO figures.