Is your feature request related to a problem? Please describe.
I am not sure if there is a RPC method available to directly get the onion address used so I checked it in localaddresses returned by getnetworkinfo https://developer.bitcoin.org/reference/rpc/getnetworkinfo.html
It was also mentioned in debug.log file:

Describe the solution you’d like
I would love to see an onion address and maybe qr code in the wallet if it is listening on Tor similar to ABCore:

Describe alternatives you’ve considered
Check the onion address in debug.log or localaddresses returned for getnetworkinfo
Additional context
Linked to #19923 because if we add such option to check the onion address, it will have to be added in the Tor documentation.