Hello,
It might be best to create a support issue so we can go over in more detail and have a screen share.
In general if you need to do a machine to machine type of flow you would use the client credentials grant type.
If you need to obtain an access_token to call your own, or 3rd party APIs you would use the below,
If you need to obtain an access_token to call Okta Management APIs you would use the below,