Piston cooling gallery plays a critical role in managing the temperature of the piston and its performance. This paper aims to study the effect of oscillatory heat transfer within the cooling galleries, focusing on two distinct types: flanged (friction-welded) and smooth structures (laser-welded). To do so, the Eulerian multiphase flow model and the k-ω SST turbulence model were used to simulate the oil and air flow through the cooling gallery. Key parameters such as the oil filling rate, wall heat transfer coefficient, oil outlet flow rate, heat removal rate by the oil, and overall wall heat transfer rate were assessed for both gallery designs at an engine speed of 1800 r/min. The results indicate significant disparities between the two cooling gallery structures: the smooth structure exhibits an oil filling rate that is 5.41% higher and an oil outlet flow rate that is 33.48% greater compared to the flanged structure. The flange structure impedes internal oil movement, which leads to boundary layer separation, secondary wall contact, and the emergence of a double vortex phenomena. Collectively, these factors influence the oil fill ratio. This, in turn, affects the distribution of oil within the gallery and, subsequently, the efficiency of heat transfer. Comparative analyses of heat transfer within both galleries, under the same studied conditions, revealed that the smooth structure outperforms the flanged one. However, the presence of a flange significantly alters the heat contribution from different walls, thereby highlighting the substantial impact of flanges on the overall efficiency of heat transfer.