I am new to Photoshop. I want to remove the rays in the upper left part of the photo. I am stuck in this part of editing...
I guess this is an old paper photo. The left top corner is badly covered by sun reflections inside the lens. This can be avoided by preventing direct sunlight to hit the lens. Afterwards one can try to reduce the damage by applying masked adjustments. The result is never a substitute for proper shooting. Photoshop's adjustment layers with layer masks are valuable. There exists also free and low cost software with adjustment layers. Examples: Krita, Affinity Photo, Paintshop Pro. GIMP and Paint.NET don't have them.
A patient person can clone some details from elsewhere if the lost details are not irreplaceable. Lost background items can often get heavy edits without causing total destruction. Strict news photos do not stand edits, but that's another story. Another possibility is to make local color. contrast and lightness adjustments.
I made the following fast and quite elementary fix:
Someone can say it's not a fix at all, because the background building looks edited. I guess that edited background is less disturbing if it's somehow uniform.
There's several adjustment layers. Listed from the top they are:
Both masks are painted manually. The advantage of the adjustment layers and layer masks is you can try as many times as you want, you do not degrade the photo.
Check also this old case, which shows less brutal methods: Is there a way to remove lens flare?
You can defeat it a little in Photo RAW, mainly playing with Clarity & Dehaze, which will remove some of the veiling glare, but you're unlikely to be able to get the lens flare itself.
Veiling glare is caused by light bouncing around inside the lens. It tends to be fairly even so dehaze can deal with it.
Lens flare is much tougher to deal with. You could try paint it out with burn or sponge - though I gave it a quick try with no joy. A small single element flare you can sometimes heal out, but this one's far too complex.
Next time, use a lens hood, or simply stand in the shade or with your back to the sun… or if none of those are options. hold up your left hand outside the shot & wave it around until you find the point it shades the lens - you'll see the flare flicker & disappear when it's shaded.
I've probably already pushed this too hard.