Having confusion in middlegame

@1
"I was playing the 4 knights game in every game" ++ Good.
"I saw some videos" ++ Do not watch videos: that is passive learning. You cannot learn to swim, ride a bicycle, or drive a car from a video and chess is the same: you have to do it.
"London, Ponziani and Vienna for white and King's Indian and Scandinavian for black"
++ Those are good too. But pick and stick to it. Each time you switch openings you lose more, not less. It takes time and losses to accumulate experience.
"I get into some problems during the middlegame" ++ We all do.
"But I can't defend at all in the middlegame" ++ Attack and defense are the same.
A good attacker anticipates defenses. A good defender anticipates attacks.
Here are two great defensive games for you to study:
https://www.chessgames.com/perl/chessgame?gid=1095025
https://www.chessgames.com/perl/chessgame?gid=1042835