While its not debatable that Hillary won more votes overall, she fell foul of the same problems Corbyn did in the UK.
Stacking up votes in safe seats/states doesn’t do anything. An extra million votes in California will not help. Trump had a decent campaign team who targeted some of those swing states that Hillary largely ignored.
Now, you can argue that the system isn’t great but the rules were set way before the 2016 election & Clinton & her team should have known which states needed visits to win & which were safe.
Although saying that, some recent polls are bringing some republican states into play this year such as Texas.