Thank you for your answer Dhranios and sorry for my english...
I checked and I am in survival gamemode, but this problem does not arise all the time: sometimes I can no longer destroy anything and suddenly I can destroy something for a second. What I mean is that it's so unpredictable that it really looks like a bug.
Thank you for your answer Lunarian
Yes the problem appeared when I was playing on a Minecraft server but since then it occurs in every game I play, whether in solo games or on the server... Thanks for the tips on how to record a video that's what I decide to do. On the video. On the video, each block I aim at I try to destroy them but it doesn't work except on some and I don't know why it work on some and not on the others.