Underlayment does three jobs under laminate. It cushions small subfloor flaws, it cuts down the hollow click sound of a floating floor, and over concrete it holds back moisture.
Some planks come with a pad attached. We do not add a second foam under those, because a soft double layer lets the joints flex. On boards without a pad, we pick the underlayment based on the subfloor.
Over plywood on an upper floor, a denser foam or cork cuts sound going to the room below. Condos and apartments often have a rule for sound ratings, so check your HOA papers and we will match the product to it.
Over concrete, a 6-mil polyethylene vapor barrier goes down first, seams overlapped and taped and turned up the wall a couple of inches. The base trim hides the edge. Combination pads with the film built in do the same job in one layer. Skip the barrier on a slab and the bottom of the HDF core will pull in moisture and swell. It is the cheapest part of the floor and one of the most important. See basement laminate flooring for below-grade work.