Back in the 1950's and '60s a wonderful group of writers, Heinlein, ,Clarke, Asimov, Smith, Anderson, Piper, Norton, Schmitz, Van Vogt, De Camp, Leinster, Reynolds, and others poured forth an endless stream of really good science fiction, both short stories and novels. The old masters are mostly/entirely dead now, and their living replacements are few, only Pournelle, Niven, Stross and Brin come to mind.
Demand for science fiction is still there, strong enough to keep the old masters in print, but little new writing is making it to the bookstore shelves (or to Amazon). The big box book stores have only four categories for fiction; Science fiction/Fantasy, mysteries, romances, and "everything else". Judging from the shelve space allocations, the Science Fiction/Fantasy category is selling as well as any of the others, but the new books are all fantasy, no science fiction. The fantasy writers work hard, but few-to-none of them compete well with Tolkien.
One difficulty for a science fiction writer is the advance of science and technology. After 1968 no one could write another "first trip to the moon story". The first interstellar faster-than-light travel stories were published before Einstein published special relativity, which rules out faster-than-light travel. Although faster-than-light drives persist in movies and TV, they faded out of science fiction stories by the 1980's. In short, science and technology advances have over run or ruled out of action many fruitful subjects for good stories.
Perhaps we need to broaden the definition of science fiction. For instance Tom Clancy's numerous thrillers are really science fiction set only a few years into the future, instead of the more traditional decades.