I once took a deep dive into the methodology of one of the custodians of "democracy rankings". It is one of the 2 most popular custodians.
Their methodology for each country was different.
For India their methodology was to survey 36 important people in the country. They did not disclose who these people were.
The survey asked them to share whether democracy was "backsliding" or whether it was becoming stronger, than the past.