Hi krishamurthy290,
It sounds as though you're attempting to update macOS, but having issues doing so. To clarify a bit further are you able to start up your Mac, and use it as normal? If so, you can find the steps for updating macOS in the following articles.
How to upgrade to macOS Big Sur
How to get old versions of macOS
If you're having issues with starting up your Mac may we have a more detailed explanation of the issue you're facing? This can help us provide the right steps for reaching a resolution.
If you're not having issues starting up the Mac, only issues with updating you may have to update via recovery mode. You can find the steps for getting the latest macOS version through recovery mode in the following article.
How to reinstall macOS
Have a great day!