@snowberry and @LuckyGuy have good responses, I think. I’m with @LuckyGuy in that it’s hard to tell just from the photos which is the outlet and which may be the pressure relief outlet (that’s generally a third outlet, located at the very top of the water heater).
Generally with electric water heaters I think the inlet will be at the bottom, and it should be fairly easy to track that pipe back to the cold water mains (which will be pretty easy to tell, since it should branch fairly close to the main shutoff for the whole system) that is, the shutoff for the whole house / apartment / living unit.
Once you know where the cold water inlet is, you may only have two other outlets: the safety relief (and the valve for that should not have a shutoff), with an outlet that goes to a floor drain or some other “open” way to relieve pressure. The safety relief has to be “to atmosphere”, so that it won’t be trying to vent into another closed system. When you know what / where that is, then the remaining outlet from the tank will be your hot water main.
(Oh, except for the drain that’s likely to be at the very bottom of the tank, and which may not be piped at all, or if it is, it’s directly to a drain.)
But I also liked the part of @bossob‘s response about the shut-off valve under the sink. Most good plumbing has a way to isolate each fixture in the dwelling, so that you can shut off any tap, any toilet or any hose bibb (if you have them) without having to shut down the entire system. If you don’t have them now, you could start to add them as you replace the individual water lines (or fixtures) as they need replacement or repair from time to time.