The receive window is maintained by the receiver and indicates how much buffer space has to be receiving more segments (from any senders). So a sender would want to take that into account when setting its sender window, not wanting to overload the receiver.
However, there could be congestion in the network as well, so the sender wants to take that into account also when settings its sender window, to not cause more congestion when the network is already congested. To figure out how congested the network is, the sender may use various congestion control algorithms, e.g., to adjust its congestion window with slow start, then congestion avoidance. As it is dynamically adjusting its congestion window, it may possibly exceed the receive window size for some short amount of time. But we wouldn't expect the congestion window to exceed the receive window for a very long time, as eventually a timeout would be reached (ACK not received in time) and the congestion window would be reduced.