An example to download metadata xml file from OKTA is as follows:
Login to OKTA Admin Account.
Navigate to Security > Identity Providers > Add Identity Provider > SAML 2.0.
Configure SAML Identity provider and click Finish.
In Identity Provider page, click Add Identity Provider.
Click Download metadata.