Hi @nayangarade,
The main difference between Inject and ValueMapValue is that Inject can be used to inject OSGi services and other dependencies into the Sling Model, while ValueMapValue is used to map JCR properties directly to Java fields in the Sling Model.
In other words ValueMapValue is specialized injector, when Inject is more common. They are not equivalent.
Examples:
The @Inject annotation is typically used to inject services and other dependencies that are not directly related to the content being mapped, but are needed for the Sling Model to function properly. For example, you might use @Inject to inject a service that generates a PDF from data in the Sling Model.
On the other hand, the @ValueMapValue annotation is used specifically to map content properties to Java fields in the Sling Model. For example, you might use @ValueMapValue to map a title property in the content tree to a Java String field in the Sling Model.
Additionally according to best practices you should avoid using Inject in any use case. You should always use specialized/dedicated injector. Result of using Inject in Sling Model is unpredictable and can cause performance issue.
For example if you need OSGi service instance in your Sling Model use OSGiService annotation not Inject, if you need vale from valueMap use ValueMapValue annotation, etc.
Please check below links for more information: