Game freezes every 5 seconds

re-creating the project helped. I got rid of most of the hitches.
Another issue was found in the mouse control input code. For some reason, a long time ago, when I was just creating the project according to some tutorial, I made the logic of multiplying the mouse input by the sensitivity and then by the delta seconds, which caused strong jerks with any FPS drop.
But still, the main reason for the drops was eliminated by re-creating the project.
There is also a dependence with FPS drops due to the size of the texture streaming pool. I haven’t figured this out yet