How to actually decide
In practice the choice is made by elimination rather than by preference, and it usually comes down to three physical questions about your house.
Where does it live?
A sealed interior cupboard rules out a heat pump unless you are prepared to duct it, because the unit needs a real volume of air to draw heat from. A garage or utility room opens everything back up, and in the Central Valley a garage is close to the ideal spot.
What is your electrical panel carrying?
This is the question that decides most heat pump conversions, and almost nobody asks it early enough. A panel with capacity to spare makes the conversion straightforward. A full panel adds thousands and turns a good decision into a marginal one.
How much hot water do you need at once?
Not how much in a day, how much at the same moment. A tank serves several fixtures at once from its stored reserve without any calculation. Tankless is limited by flow instead, and that limit is far lower in winter than the headline figure suggests.
If your current unit has already failed and you need hot water today, that answers it for you. An emergency is not the moment to run a conversion, and the emergency page covers what to do instead.