What is meant by “my account is getting locked”? Your Cumulocity user?
Could it be that you are providing the wrong credentials for your tenant and microservice? That would explain that your cumulocity user is locked attempting to get authenticated but with the wrong credentials for multiple times.
Normally you should not use your user credentials but ideally create a dedicated prometheus user in cumulocity that only gets the permission to call the prometheus endpoints of your microservice.
I described the process here: