The same applies when your app is installed from the app store. You will need to redirect them to this url for installation: https://${shop}/admin/oauth/authorize?client_id=${client_id}&scope=${scopes}&redirect_uri=${redirectUri}&state=${nonce}, where redirectUri is your url, where your logic for requesting access token resides. Then, Shopify will include a temporary code as part of redirectUri during the OAuth process and redirect it, which you will use to request for access token.
These two docs elaborate this: Implement authorization code grant manually (shopify.dev) and https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant