I'm unable to reproduce this issue. Using the following script:
public class CollisionColor : MonoBehaviour
{
void OnCollisionEnter2D(Collision2D other) {
if (other.collider.TryGetComponent(out SpriteRenderer otherSR)) {
GetComponent<SpriteRenderer>().color += otherSR.color;
}
}
}
And this sprite setup:

I find the sprites change colour in play mode when they collide, as expected:

So, the problem is somewhere in code you have not shown us. Double-check that the object you're inspecting is the one you're seeing on screen, and that your sr
variable is referring to the SpriteRenderer
you expect. A common error here is to keep holding onto a reference to the prefab the objects were spawned from, rather than the live copy running in the scene.
If you're unable to identify the cause, then edit your question to include a Minimal Complete Verifiable Example: every line of code and every step of scene/inspector setup that a reader would need to follow, starting from a new, empty project, to reproduce the same problem you're seeing. Once we can reproduce the issue, we can test potential fixes to be sure they'll work for you.