So when you the access token is generated, you may want to go through its details. Within the details, you will find a field called ProductContext which will basically contain access details of all the companies that your Adobe ID/Fed ID has. Somewhere within it, you will find a parameter called "global_company_id" and the value will be the global company ID you are looking for.
Please note, you may find multiple companies/Experience Cloud Orgs listed depending on your access. Ensure you pick up the company ID for the company on which you are trying to make an API request.