The key inputs to determine compensation are level, role/title, industry, geography
Use tools like levels.fyi and glassdoor to understand what the typical market rate for the job is.
One pro tip here: use https://h1bdata.info/ to see salary data that companies are legally required to report to the government
However, these sources can be out of date or show an incomplete picture, so the best source is talking to friends or people in the community, like in Taro.
In Rahul’s case, he had a pretty good idea that Snap gave out a lot of equity, Meta gave out huge signing bonuses, etc.