Hi Puneet,
Sometimes Windows updates failed to install because of corrupted system files. It may fail to install at first instance but then succeeds after a couple of attempts. To resolve your concern, kindly refer to this article Fix Windows Update errors.
Let us know if you need further assistance.