Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!
I see that the rectangle isn't made by using the shape option (no shape icon in the layers panel)(or you rasterised it).
I can only assume you made that rectangle by using the rectangle marquee tool and filled it (in this case with a gradient)
To change the color to a uniform color, hold ctrl and left click on the thumbnail. (you'll see the marching ants around the rectangle)
Select the wanted color with the color picker and make sure its set as foreground color.
Press alt+del to fill the rectangle with the choosen foreground color.
If you want a new gradient, double click on an empty space in the highlighted layer box and this will open the layer styles.
View attachment 82499