I have already overridden new button with the lightning component in my org but when I make a managed package out of it and install it some other org, it doesn't override it, we manually have to do that. Is there any way I can automatically override it?
This setting cannot be packaged, and cannot be automatically overridden. This is more of a safety feature than any simple inconvenience. If packages could override standard actions by default, it could potentially disrupt business operations.This is something you need to specify in your post-installation instructions.