Thank you for your help @RomanR, I followed the methods which discussed the article you shared, but still I am getting the same error. It took a long time to complete all the methods together.
Then I thought I would not play the game anymore. But my heart does not want to accept it. I started searching on Google and found this article first and I started matching the different methods which is not discussed the article you shared. Then I found this method Run Genshin Impact with Administrative Privileges. After doing this task, I restarted the game and started playing. Believe me I did not get any such kind of error code which I was getting. I played the game for an hour and now my son is playing the game. Its miracle!