"In General" most Shimano 6-10s road and 6-9s Mt RD are compatible. It's about cable pull "per click"
Shimano has compatibility charts but they don't often cover multiple generations of a model.
Other sources are out there.
https://www.celebrazio.net/bicycling...atibility.html
https://bike.bikegremlin.com/1278/bi...compatibility/