In this work, we investigate the thermodynamic behavior of the generalized scalar Yukawa model, composed of a complex scalar field interacting with real scalar and vector fields. In particular, boundary effects on the phase structure are discussed using methods of quantum field theory on toroidal topologies. We concentrate on the dependence of the thermodynamics with the number of compactified spatial dimensions. In this sense, the phase transitions are analyzed and compared with the system in the situations of one, two and three compactified spatial dimensions. Our findings suggest that the presence of more boundaries tends to inhibit the broken phase.