The 20-year-old, who dumped Williams out of the Australian Open at the start of the year, was eliminated at Flushing Meadows after being beaten 6-4 6-1 by the defending champion.
"Obviously, she's No 1 in the world for a reason. I thought she played really well herself," Stephens told reporters.
"Obviously it didn't go how I wanted. The second set got away from me a little bit.
"All in all, I thought I competed well and played well. That's all you can do, really."
The result was Stephens's best ever finish at the US Open having twice before been stopped in the third round.