Correct statistical test to compare pre and post questions (dummy variable)

Hi friends,

What is the correct statistical test to compare a group who was tested in two points in time (pre and post) The same people.

I have a dummy question that was asked in pre and post test (exact the same question):
1=correct to the questions

I want to see if there is any significant differences in participants' asnwers.

perhaps, ttest?? it is not matter that my variable is a dichotomous.

Thank you all in advance!