Make POST request to create issue (Authentication Issue)

So I’m trying to run a curl command to create a new issue in my JIRA server.
I have tried to make the same request using Postman but used basic authentication.
I’m trying to authenticate with the Bearer Token method, but I’m unable to figure out how to acquire this token. Can someone please help me get this token, I have combed through the documentation for a while now:(

Here is my curl command:

curl --request POST \
  --header 'Authorization: Bearer INSERTHERE'\
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '
    {
    "fields": 
        {
            "project": {
                "key": "SPA"
            },
            "summary": "Bug notification",
            "description": "THis is a test notificaiton from cmd",
            "issuetype": {
                "name": "Bug"
            },
            "components": [
                {
                    "id": "0"
                }
            ],
            "priority": {
                "id": "0"
            }
        }
    }' \
  --url 'https://server.atlassian.net/rest/api/2/issue'