The answer often depends on who is in the room.
A developer asked to close a capability gap will usually propose building it. A vendor asked the same question will usually propose buying it. Neither answer is wrong on its face, and neither is a decision-both are defaults from where each person sits.
A useful decision starts somewhere else: is this capability genuinely differentiating, or is it a solved problem the organization is about to solve again from scratch? Undifferentiated plumbing-scheduling, ticketing, basic reporting-rarely earns the ongoing cost of ownership that a build creates.
The build estimate that gets presented to leadership is almost always the cost to ship version one. It is rarely the cost to secure, patch, extend, and eventually replace it once the person who built it has moved on.