Can the witness not answer some questions from the lawyer?

Of course.

First, questions irrelevant to the case can be refused to be answered.

Second, questions related to the case can also be refused to be answered, but the judge may lose the role of witness if he refuses to answer.

Not to mention lawyers, even police judges can refuse to answer when they ask witnesses to testify. In our country, although citizens have the obligation to testify, there is no specific punishment for citizens' refusal to testify, so they can completely refuse to answer and testify. This is caused by the imperfect legislative protection of witnesses in China's laws.