Many people are shocked to realise that if they have bought a property with someone they're not married to and the relationship ends, there is no legal guarantee that they will be able to reclaim more than 50% of the value of the property, even if they have paid more than half of the cost. The law in this area is not clear-cut and a claim may be difficult to establish. If you're living together as a couple, there may be a legal basis for asking the court to award you a greater proportion of the value, but if your ex-partner will not agree a settlement you would have to go to court - which may cost more than the amount in dispute, as well as being stressful and upsetting. There is also no legal right to have the property transferred into your sole name.
If you are buying with a friend or relative rather than a partner, your legal options for getting anything other than your share according to the title deeds are even more limited.
All these situations can be prevented or at least managed by putting in place a legal agreement, sometimes called a cohabitation agreement or a "NoNup". Ideally, this is done before you complete the purchase of the property, but it’s not too late to do it afterwards.