@Laxmi Prasanna If you want to change password of User1, you need to use password flow to get a token using User1's credentials. You cannot use that token to change password of User2 even if User1 is Global Administrator. If you want to change password of User2, you need to obtain a token using User2's credentials. You cannot use Client_Credential flow for this purpose as well.
Hope this helps clarifying your doubt.
-----------------------------------------------------------------------------------------------------------
Please "Accept as answer" wherever the information provided helps you to help others in the community.