There's no proper API to ask to prompt to homescreen. The only thing you can do (android chrome only) is enable the prompt to be shown at some point in the future. Google takes over from there and decides when and if users will be prompted, and the exact UI and copy of that prompt.
For sites that have enabled this, you'll be prompted once you visit a site a number of times over a short enough period of time.
This is a staggering limitation unique to PWAs. Any Product Manager I've ever worked with wants to experiment with different copy, UI, timing, etc... So the PWA add to homescreen prompt limitations makes it a complete non-starter.
In lieu of a proper API for PWA add to homescreen I'm then asked to put up prompts that send users to native app stores.