Buy an off-the-shelf CRM when your sales process looks like most sales processes: leads come in, someone qualifies them, deals move through stages, and you want reports. That covers most businesses.
Buy and connect when the CRM fits but the edges do not: leads arrive on WhatsApp, invoices are raised in Tally or another tool, site visits or appointments need booking. A few integrations close the gap at a fraction of the cost of a build.
Build when the core record is not a deal at all, for example a property unit moving through booking and payment stages, a patient episode, or a shipment, and forcing it into a sales pipeline would mean fighting the software every day.
A disclosure: we sell our own CRM, Desk, and we also build custom systems and integrations. We have tried to write this so the advice holds whichever you choose.