The choice is about when it makes sense to integrate the electronics. Ready-made boards and modules let you test functions without developing every circuit. A custom board gives the team more control over the shape, component selection, and way the electronics go into the product.
For a prototype, a ready-made sensor and controller might be enough to check whether a feature works. For a small production run, a suitable module may still make commercial sense. At higher volumes, a custom board may reduce part count and assembly labor or fit where a stack of boards will not.
If you are still proving the function, a ready-made module can help you learn sooner. Revisit the custom board decision when you have better information on volume, space, assembly effort, and the cost of developing and testing it.