Many states have already passed something like this, which only takes effect once enough states sign on. https://en.wikipedia.org/wiki/National_Popular_Vote_Interstate_Compact
However, I think it’s unlikely that this will get over the 270 hump anytime soon, because right now GOP-run states (correctly) perceive that the EC has a pro-GOP tilt (for now at least); and the swing states benefit a lot from swing status.
Sorry