Hello abdulraza,
Thanks for reaching out in Apple Support Communities! We understand you're having trouble updating your macOS due to the internet connection error you've provided. We're happy to assist you with this.
Let's try a couple steps to help isolate any issues with the network. Even though your network connection is strong, there still could be things within the network causing this issue. First, let's start by power-cycling your router/modem. This means unplug the power cable from your modem and router for 30 seconds and then reconnect them. Wait for the lights to come back on solid and try the update again.
If you receive the same error, try connecting to a different, known, reliable network. Then try the update again.
If the issue persists, contact Apple Support:
Contact Apple for support and service - Apple Support
Thanks for using the Apple Support Communities, and have a great day!