This study investigates the effect of the movement of a moving lid on the heat transfer and cooling of three isothermal blocks inside a cubic enclosure filled with a Cu-water nanofluid. The study's geometry is a three-dimensional enclosure with three blocks which are assumed to have a fixed hot temperature TH. The bottom, front, and back sides are insulated, while the other surfaces are kept at a cold temperature. The study considers two cases for the movement of the upper lid: one where the lid moves in the longitudinal direction, and another where it moves in the transverse direction. The dimensionless governing equations considering the boundary conditions are solved by implementing the finite volume approach with the power low as a resolution scheme. The study varies several factors such as the shape of the nanofluid, the shape factor of the blocks (3L/4, L/2, and L/4), the number of cold walls, the Richardson number (0.01 to 10), the volume fraction of nanoparticles (0 to 0.06), at a fixed Grashof number (104). The results indicate that decreasing the Richardson number improves the heat transfer coefficient's performance. Also, the study finds that longitudinal movement provides better block cooling compared to transverse movement. Additionally, the study found that changing the height of the blocks from L/4 to 3L/4 resulted in a decrease in heat transfer inside the cavity and over the blocks. Specifically for the case of the longitudinal movement, a decrease of −44% was observed along blocks one and three, and −51% along block two. As stated, the research aimed to investigate the impact of different directions of lid movement on the cooling of heater blocks, with the goal of enhancing the thermal performance and heat transfer efficiency of various technical engineering equipment.