How to inspect HTTPS traffic of a third-party app on Android 9+
As tipped by @beeshyams, HttpCanary is perfect for this.
You need a rooted device, of course.
HttpCanary takes care of all of the difficult steps (certificate generation and installation) transparently.
It shows a list of requests (filterable by app), and details of each request and response.
The best feature is this overlay showing request while I am using other apps (bottom right):

Even though the Google Play page says &quot;HttpCanary core codes are opened in Github&quot;, https://github.com/MegatronKing/HttpCanary does not contain most of the source code, so I believe it is not open source.