Adding star’s in anticipation that a territory would become a State of the United States was very common. Most likely your flag was created by a flag maker jumping the gun expecting that the Nebraska territory would be a State in 1864. The Nabraska Territory was created in 1854 and it was a lengthy process on the path to Statehood. The 1864 appeal was blocked by the Democrats in the territory, In 1866 the territorial legislature submitted a proposed state constitution to the U.S. Congress. The 1866 document was returned becouse it limited franchise to whites. In 1867 a revised constitution was resubmitted and approved by Congress but vetoed by President Johnson. Congress overrode the veto and Nebraska was declared a state on March 2, 1867 by President Johnson.
There was several territories submitting documents for statehood during this time period, it’s possible that the 38th star on your flag is not for Nebraska but Colorado.
I don’t recall seeing a 37 star battle flag or National Colors but there are samples of 36 star flags, National Colors. One is General Grant’s HQ flag made prior to Nevada becoming a state, October 31, 1864. Or it was made before the star was officially added, which is July 4, 1865.
The godfather of Confederate Vexillology not only studied Confederate flags but Howard wrote several papers on his studies of U.S. flags. His last work “The American Flag: Two Centuries of Concord & Conflict” by Howard Michael Madaus & Whitney Smith is a great source. Whitney Smith has many books on the United States National flags, 29 in all so far. His booklet “Long May It Wave” is a good basic source on the United States flag or flags.