If that is the case, then it is not for me.
The primary form of UPI usage is from smartphone apps (provided by banks or by the operator of UPI, which is the NPCI BHIM app).
See the UPI overview page [1] by NPCI (a private consortium operating UPI, IMPS and a few other services).
[1]: https://www.npci.org.in/what-we-do/upi/product-overview
But if one just needs to send or receive money does one need to share one's cell phone number to this 2nd party?
UPI assigns/allows one or more Virtual Payment Address (VPAs) for each account, which looks kinda like an email address. The default VPA is usually phone-number@bankname, but you can (and should) disable that default VPA (mainly because UPI also has a payment request mode where anyone can request anyone else for money and there are plenty of scams with that and enumerable phone numbers). Instead, create the VPA as some-random-name@bankname (assuming nobody else has taken that). The sender and the receiver would know the VPA of the counter-party as well as the full name of the person (the name gets displayed before confirming a payment, and is helpful to know that it’s going to the right person).
Also note that while some banks allow only one VPA for an account, some banks allow several VPAs for the same account (think of them as similar to what email aliases are for the same email account). So you could have mybusiness@bankname for your clients to send business payments, mybigdinnerparty@bankname for your friends to send their share of the dinner party bill, and so on — all linked to your name and the same bank account.
But sending money actively (as a customer) from a personal bank account is not possible afaik.
You only need to disclose this vpa to the merchant.
It looks like username@statebank
You don't need to disclose your phone number or bank account number to the merchant if you don't want to as UPI has multiple address mechanisms.
You can also use QR