Most “buy” decisions are actually “buy then build,” as customizations and integrations come into play. Nothing is ever exactly right out of the box. So just assume “buy then build” and spend your time asking “what do I need to build?” And “how much capacity do I have to customize?”
A former CTO colleague of mine had a rule, he wouldn’t buy unless the build was 5% or less. I think everyone has to find that threshold for their organization.