For short visits you can get surprisingly far without one, since most ride and delivery apps accept a foreign number for registration and verification. But there are real friction points: some local apps only accept domestic numbers, drivers and couriers often call to confirm pickup and can't reach a foreign number affordably, and restaurant or clinic bookings frequently want a local contact. For anything beyond a couple of weeks, a local number makes life noticeably smoother.
On longevity: tourist SIM numbers typically stay active as long as the plan is valid, then enter a grace period where the number is reserved but services stop. If you top up within that window, often somewhere between one and several months depending on the carrier, you keep the number; let it lapse and it gets recycled to someone else. The exact policy is on each carrier's website and worth checking if you plan return trips.
One caution: don't tie important accounts to a tourist SIM number you might lose.