The vote is symbolic and non-constraining, but analysts fear this could signal the beginning of the end.
"This highlights the government's solitude, the low parliamentary support it has," said Fernando Vallespin, a political scientist at the Autonomous University of Madrid.
With just 84 Socialist lawmakers out of 350, Sanchez heads up Spain's most minority government in history.
He came to power on June 1 after spearheading a no-confidence vote to oust his predecessor Mariano Rajoy, whose conservatives have been hit by repeated corruption scandals.
The vote went through thanks to disparate support from far-left Podemos, Catalan centre-right separatist lawmakers and Basque nationalists.
"The coalition Sanchez was able to create to dismiss Rajoy was a negative coalition, not one to govern," said Antonio Barroso, an analyst at consultants Teneo Intelligence.
"It's the first episode of what awaits him after the summer."
The Socialist government intends to hang on and govern until the end of this term, in June 2020.
The government will re-introduce new deficit targets in a month, said its spokeswoman Isabel Celaa, without saying whether it would go back to the original predictions.
"We're not recognising any situation of weakness," she said.
But she called for responsibility on the part of those parties that voted for the no-confidence motion.
The next few months will be difficult for Sanchez, who has to put together a draft budget for 2019 and have it voted through.
"With such a weak government, the potential to move forward is greatly reduced, even with things that shouldn't pose a problem," said Vallespin.
He gave as an example the weeks of negotiations needed to renovate state television's management, which was finally approved on Friday.
The opposition Popular Party's new leader Pablo Casado, who has just replaced Rajoy on a promise to veer further to the right, has been vocal in his criticism of the Socialists' perceived inability to govern.
He has called on the Socialist government to "reflect on how long it will subject Spaniards to this instability, with repercussions on the economy and job creation."
"While the parties say they don't want elections, they're already campaigning because they think there could be elections at any moment," said Barroso.
As the October 1 anniversary of the illegal independence referendum in Catalonia approaches, separatist parties -- whose support in parliament is crucial to Sanchez -- could go more radical and hinder dialogue between Madrid and Barcelona.
Any political paralysis would force Sanchez to call early elections.
Right now, that wouldn't necessarily be a bad thing for him as he is ahead in opinion polls.
"Calling elections wouldn't be so bad because if he delays it, it could highlight his incapacity to reach agreements, the economy could deteriorate," said Vallespin.
Barroso, however, believes that Sanchez will hang on, banking on the economy continuing to go strong, unemployment continuing to drop, and himself rising in opinion polls.