When puff pastry is caramelized to use in patisseries like millefeuille, French chefs call it a "feuilletage" (which means "lamination" or "leafing"). This is baked on its own before being assembled with cream, fruit, etc.
The baking needs to be carefully managed: the pastry should puff into layers, but not swell too much (just a few millimeters normally). To achieve this, we need to follow a special method that I have explained for you here.