Heat transfer and fluid flow in cavities is often a result of convection. The study of convection in enclosures, such as rectangular cavities, under different parameters, holds significance in understanding the thermal-hydraulic characteristics, like temperature and air velocity distribution, in systems where heat transfer and fluid flow are involved. This research focuses on the numerical investigation of temperature and air velocity distribution in a rectangular cavity. COMSOL Multiphysics software was utilized to create a model of the cavity, subjecting it to regulated temperatures of 323.0 K, 333.0 K, and 343.0 K at operating times of 0, 300, 900, and 1,500 seconds. The cavity's bottom wall was heated by a heater, and the inner sides of the right and left walls were insulated using fiberglass. The findings from the research indicate that at an operating time of 900 seconds, the maximum air velocities recorded were 0.06, 0.06, 0.03, and 0.10 m/s at the left wall, right wall, bottom, and top of the cavity respectively. Beyond 900 seconds of operation, the air velocities remained constant. Furthermore, at 900 seconds of operation, the maximum isotherms at the regulated temperatures of 323.0 K, 333.0 K, and 343.0 K were approximately equal to their respective temperatures, but they precisely equaled the regulated temperatures at an operating time of 1,500 seconds. The results of this research can be applied to various areas that involve heat and fluid flow, including heat exchangers, building design for energy efficiency, solar systems, nuclear reactor operations, microelectronic component cooling, energy storage, heating devices, and refrigeration systems.