The gameplay accuracy is a scale from 0 to 100 and it is calculated based on the accuracy of each of your moves. Chess.com collects a lot of data from played games that they use to evaluate which moves are more important for the final accuracy.
The final accuracy is a weighted average and that explains when you play a game with two book moves and a blunder why you can get an accuracy of 0.7 and not 66.7.
The average of a single move is determined by how close the evaluation deviates from the top engine suggestion and how far is the evaluation rank placed. If the move played was the 2nd best but was -3 instead of best -1, then that is more accurate than if the same move had 9th rank.
Chess.com has released these two articles that give some insight on the analysis:
How is it measured?
How to use game analysis?
Note:
Chess.com isn't open source and they haven't shared all the details of the calculation, so more explanation needs more speculation.