To complete such levels successfully, you need to collect diamonds in a specific order, according to the taskbar in the upper part of your game screen.
 
Please note that every such level has a different order of diamonds!
 
If you collect a diamond of a shape different from the one you need to collect, this diamond is considered lost.
If you haven't collected all the diamonds or you just want to complete this level faster, you can use a Diamond booster : it will collect all the diamonds in the correct order automatically.