There is a container at the bottom of the game that has 7 boxes. Each time you select an object, it will fall into one of the boxes. Once the container is full, you will run out of boxes.

At that point, a pop-up message saying 'Out of Box' (or 'Out of Space') will appear. You can choose to continue by spending coins or watching a rewarded ad, or you can quit the level and restart it.