Failed to install TWRP on Samsung A520F with Heimdall

Hi @fcodvpt welcome to the /e/ forum.

From your description of this Samsung behaviour, I think the most likely thing is explained in this link Your first boot into TWRP.

I am uncertain, but “Product: Gadget Serial” might indicate a different issue.