The Territory of Hawaii or Hawaii Territory was an organized incorporated territory of the United States that existed from August 12, 1898, until August 21, 1959, when most of its territory, excluding Palmyra Island and the Stewart Islands, was admitted to the Union as the fiftieth U.S. state, the State of Hawaii. The Hawaii Admission Act specified that the State of Hawaii would not include the distant Palmyra Island, the Midway Islands, Kingman Reef, and Johnston Atoll, which includes Johnston (or Kalama) Island and Sand Island, and the Act was silent regarding the Stewart Islands.

Can we conclude that was hawaii a territory before it became a state?
yes