Connect 5V relay to ESP32 WROVER B board
Assuming a relay module: check if it is OK to drive it with 3.3V logic when it is on a 5V power supply, or show the specs for us to look at.
Driving a relay module with 3.3V logic is unlikely to harm the ESP32, but it may not drive the relay properly if the relay module expects 5V logic.
Generally, I would even prefer using an external power supply rather than the 5V pin on a microcontroller board to power a relay module.
As long as you connect everything as you describe, it should work just fine (if the relay module accepts 3.3V logic).