Assuming you are looking for the (or the concept of trapping a mob/player with a piston for an advancement), here is a useful review and guide breakdown for achieving this tricky mechanic.
Since there is no widely recognized game titled exactly "Lovely Craft," it is highly likely you are referring to (often nicknamed "Lovely Craft" in certain mobile communities or modded versions) or the popular "Lovely Planet" speedrun game. lovely craft piston trap achievement guide full
Why this works: