There are three fundamental uses of present perfect; Continuative, Existential and Resultative. The context in your example is regarding Resultative.
I have noticed that there is a scratch on my car, so I have painted my car.
Your example is correct. In this sentence, noticing a scratch on your car is the prior event that leads to the result in the current state; You have painted your car.
I have painted my car is also correct and resultative. The result is not mentioned, but it is inferred by the listener or reader. The result could be "The scratch is cleared".
I have noticed that there is a scratch on my car, so I painted my car.
This is also correct and prefered. Since the result is not mentioned, using simple past is a better option. However the usage of present perfect is depending on what you really want to say not how and when to use it.