A short story about a wheeled robot that is in turmoil over its apparent obsolescence.But finds a way to go on. I think humans are long extinct at the time this story is set in.
The complex changing of events in this story has the robot doing an incredible variety of things to do "[find] a way to go on". (Starting with avoiding being caught and dismantled.)
However, in this story, humans are not extinct as mentioned in the question. Another robot of Simak's matches that description, but is not in danger from its obsolescence, as mentioned in the question.
I will have to reread to remember the variety of conditions he underwent from outlaw to worker in a society of robots to a newer body (again, outlaw) to servitude to work his way to other planets. As always, Clifford Simak's heartwarming style runs through it.
An early paragraph in the story sets the tone (and match to the question) without spoilers:
The empty dwelling held a not-quite-haunted quality, the aura of a house that waited for the old gay life to take up once again. But it was a false aura. All the portraits, all the china and the silverware, everything within the house would be sold at public auction to satisfy the debts. The rooms would be stripped and the possessions would be scattered and, as a last indignity, the house itself be sold. Even he, himself, Richard Daniel thought, for he was chattel, too. He was there with all the rest of it, the final item on the inventory. Except that what they planned to do with him was worse than simple sale. For he would be changed before he was offered up for sale. No one would be interested in putting up good money for him as he stood. And, besides, there was the law - the law that said no robot could legally have continuation of a single life greater than a hundred years.
Richard Daniel, the robot in in "All The Traps of Earth" was in danger with human law not allowing his obsolescence, but humans were not extinct.
In contrast, Jenkins, the robot in the collection of short stories
is thousands of years old by the end, and humans are extinct.
But he is not, as the question says, "in turmoil over its apparent obsolescence."
So one of Simak's robots matches the " in turmoil over its apparent obsolescence" part of the question, and the other one matches the " I think humans are long extinct at the time this story is set in" part of the question.
One or the other fits one part of the question; neither fits both.
"City" is short stories in chronological order, from humans living on the earth with their robot servants, to humans breeding dogs to speak and read and write, to humans becoming extinct (or going into permasleep, or transforming themselves into Jovian bodies to live on Jupiter), to only the dogs running the earth, with only dim memories of humans. The dogs call all humans "websters".
The robot Jenkins serves a long line of the Webster family, then the dogs, for thousands of years.