Rayleigh-Bénard convection in square closed cavities filled with Oldroyd-B fluid was studied using OpenFOAM-based RheoTool. For the RBC in Newtonian fluids, the transition always occurs from conduction to steady state convection with increasing Rayleigh number (Ra). On the other hand, the viscoelastic fluids may also show the transition from conduction to oscillatory convection. Further increase in Ra may result in a steady state convective solutions. It is further noted that the behavior is similar to Newtonian fluids for larger values of viscosity ratio (B). Considering the abovementioned different flow behavior at different values of the parameters, it is noted that there are five different types of solutions possible for the viscoelastic fluids viz. pure conduction (PC), one roll periodic oscillations (ORPO), one roll steady state (ORSS) convection, two roll periodic oscillations (TRPO), simultaneous one and two roll steady state convection. Therefore, a bifurcation diagram in the parametric space of Ra and B is presented, depicting these five regions corresponding to each type of solution. The boundaries of these regions have been identified by numerical simulation. Note that all these regions exist in the laminar flow regime, and the transition to turbulence is not considered here. Interestingly, at low values of B, as one increases Ra, it is seen that the ORSS region is sandwiched between ORPO and TRPO. The likely reason for this interesting behavior is explained. Moreover, representative solutions in each region in terms of isotherms, streamlines, and vector plots have been included to demonstrate the dynamics of each delineated region.