Republicans failed to repeal and replace ObamaCare for four reasons. First, there was never agreement about what the party was for and what it was against even after 7 years and 60 repeal votes in Congress. Second, the Republican leadership did nothing to help forge a consensus by means of hearings, meetings, etc. Third, the Paul Ryan replacement bill was completely different from what had been promised the voters by Donald Trump and Republican candidates during the election. Finally, and most importantly, the bill did almost nothing in a visible way to solve the problems of ordinary people.
Let’s take these in reverse order. Before there was Obamacare, the market for individual insurance worked reasonably well. In all but a handful of states, insurers were free to price risk based on the health status of new buyers and policies were guaranteed renewable: once insured, people could not have their insurance cancelled or premiums increased because of a health problem.