If you simply crush a mob between two pistons, they might just get pushed out of the way or take minimal suffocation damage. To guarantee a kill, place a cactus block or a block of lava directly above where the two piston heads will meet. When the pistons extend, they will push the target up into the lethal element.
Since “Lovely Craft” isn’t an official major title, I’ll assume it’s a Minecraft-style game where you need to to earn the achievement. lovely craft piston trap achievement guide top