When most newbies to the forum say "relay" what they actually mean is a relay module. Of course it's important to establish that is the case. Relay modules sometimes have opto-isolators, but mostly they have driver transistors, reverse voltage coil diodes and indicator LEDs. What most newbies don't realise, of course, is how old fashioned relays are (though they can still have a place) and more importantly how much current they draw to activate their coils. They don't realise that for switching DC voltages, a logic-level MOSFET is cheaper, easier, smaller, simpler, faster, quieter, longer-lasting and need almost no current to operate them.