Psychologists' focus shifted away from the study of cognition in the 1920s-1950s (early 20th century) and back toward it in the mid 20th century.
In the early 19th century, psychology was becoming a scientific discipline. Behaviorism was the focus until mid 20th century. During this this time, Cognitive psychology was shaped as a formal school of thought. Although, the study of human cognition started over two thousand years ago with Aristotle.