The math usually comes down to trip length and how much data you need. Home carrier roaming passes, typically sold as daily or weekly bundles, win on convenience: your number keeps working, nothing to install, and for a two or three-day trip the total cost is often acceptable. Daily fees compound quickly though, so on a two-week trip a daily pass usually costs several times what a local SIM with more data would.
A local SIM or eSIM almost always wins on pure value for stays beyond a few days, especially in countries where prepaid data is cheap. The trade-offs are a little setup effort and, with data-only eSIMs, no local phone number.
My usual advice: under roughly four or five days, or if you absolutely must keep your home number ringing for work, check your carrier's roaming pass pricing first. Longer than that, buy local.