"Align rotation with snapping target" not working properly newbie to Blender here. I'm having trouble using the snapping tool, specifically the "align rotation" one. For some reason when I use it, the object instead of dragging along with the surface as it should normally, it kind of... "flips" itself, for example:

Here's how it looks without doing any action,



but the moment I try to move it around...



zoop



What is causing this? Am I doing something wrong? Did I forgot to configure a thing?
I believe the problem is that you are doing this in Edit Mode, all within a single object. Instead you should be doing this in Object Mode, and the cube should be a separate object from the surface you want to align it to.

With all the vertices of the cube selected, press P to separate it into its own mesh object. Then try again from Object Mode.