History, at the most basic sense, is the study of the past. So literally, anything that is the past, including the immediate past, is history. The answer isn’t all that helpful though.
We can look at 9/11 as a good test case, since the anniversary just recently passed. When I was still in college, the political history course I took (this was in 2008) 9/11 did feature in the text book. 9/11 is a major event that changed the world, or at least the United States, in many regards, especially in the realm of politics. It was argued, and I think effectively, that 9/11 helps break up the history of the U.S. into somewhat of a new era. So we can talk about post 9/11 history and politics as being different than pre 9/11.
Jumping to today, on the anniversary of 9/11, my 3rd grade son was taught about the event. Its part of the history of the U.S. now and is taught like that.
We can jump to a different event, one closer to me. In 2016, the Dakota Access Pipeline, the portion in North Dakota, was set to cross the Missouri River north of the Standing Rock Reservation. A protest would ensue. Being a historian, and at the time living in the area, I realized that this event would have considerable impacts, and was an important piece of history unfolding in the area. Of course I wasn’t the only historian that realized that, and many historians set off to record the events that were unfolding, and put them in a larger historical context. I and other historians treated it as history, and sought to document it as best as we could at that time. And there are historians like myself that continue working on the subject, as the after effects of the protest still are unraveling, and new information continues to come to light. So this is a clear example of events instantly becoming history as they are happening.
One thing that has made history much easier today is that everyone records information that can be value. Researching local history, newspapers are an invaluable resource, and are clear examples of history being recorded as those events are happening. Now, not all reporters may realize that they are recording history, but historians are always digging through newspapers because of that.
So to sum up, history is anything that is in the past, including the immediate past. And many historians do make great efforts to record that history as much as possible as those events are unfolding.