Freeze top layer is a feature that is used to add snow and ice to mountains and cold biomes.
Freeze top layer tries to generate in all chunks in Overworld. In each chunk, it tries at each block column to generate snow or ice on the terrain surface if the biome temperature there is cold enough (below 0.15) and the block light level is less than 10. If the surface is water, an ice block replaces the water. Additionally, snow tries to generate on the surface if it can attach on the surface's block.
Bedrock Edition:
In Bedrock Edition, it is technically not a feature. The game simply iterates through each horizontal coordinate after the chunk generation to generate ice and snow.