@Ridhima Bhalerao
Looking at your error message it looks like you might not have the correct permissions to disable the user's account. Are you trying to do this through Microsoft Graph Explorer?
I wasn't able to replicate your issue but will post my findings below: Using the Microsoft Graph API
Patch
https://graph.microsoft.com/v1.0/users/testuser1@.domain.onmicrosoft.com
Request Body - {"accountEnabled":"false"}
Once the command returned the appropriate response. I checked to make sure the account was actually disabled.
Get
https://graph.microsoft.com/v1.0/users/testuser1@.domain.onmicrosoft.com?$select=accountEnabled
Please let me know if you have any questions.
Thank you for your time and patience throughout this issue!