I think I found it. It's likely Ray Bradbury's The Pedestrian.
from the Wiki article:
In this story we encounter Leonard Mead, a citizen of a
television-centered world in 2053. In the city, roads have fallen into
decay. It is revealed that Mead enjoys walking through the city during
the night, something which no one else does. "In ten years of walking
by night or day, for thousands of miles, he had never met another
person walking, not one in all that time." On one of his usual walks
he encounters a police car which is possibly robotic. It is the only
police unit in a city of three million, since the purpose of law
enforcement has disappeared with everyone watching TV at night. Mead
tells the car that he is a writer when asked about his profession, but
the car does not understand, since no one buys books or magazines in
the television-dominated society. The police car or its occupants
struggle to understand why Mead would be out walking for no reason and
so decides to take him to the Psychiatric Center for Research on
Regressive Tendencies. He is forced to get in the car. As the car
passes through his neighborhood, Leonard Mead in the locked confines
of the backseat says, "That's my house". There is no reply.
This story was originally published August 7, 1951. It's been widely anthologized (to say the least).