The temperature rise of transformers is a key safety factor that impacts the normal operation of prefabricated substations (YBM). Therefore, studying the ventilation and heat dissipation of transformer rooms is crucial. This paper aims to investigate the dry-type transformer SCB11-3150kVA/10kV. Based on the electric-magnetic-thermal coupling method, the thermal load characteristics and heat transfer laws of the transformer are analyzed to establish a calculation model for transformer heat loss. The heat generation principle and distribution of the temperature field are also studied. The YBM(P) 29-12/0.4HV/LV prefabricated substation is taken as the research object, and a three-dimensional thermal-flow coupling analysis model of the transformer room is established using multi-physics field simulation software. The model is used to analyze the influence of the layout of the air inlet/outlet, the fan speed at the exhaust outlet, and the position and area of the air inlet/outlet on overall ventilation and heat dissipation. Based on compliance with engineering design requirements, this paper proposes reasonable suggestions for optimizing the ventilation and heat dissipation structure of the transformer room.