After cast removal joint becomes stiff because of inactivity. The reason may be the scar tissue which increases as healing occurs. However, as you are complaining of me buckling also, and that should not occur if you are sure that your knee is actually buckling, then you should see your surgeon again.
Next Steps
Physiotherapy, maybe considered for knee stiffness