I tried to do it again from scratch but only with c style code (except by the shaders and the glfw window) and i got the same result. Why it only renders 1 cube?
In the loop where you iterate over the positions, you translate the matrix model with the position correctly, but when you rotate it in the next line, you rotate the identity matrix, not the translated matrix, and put the result into model, which resets the position. And so all the cubes get rendered at the same place which results in it looking like only one cube is being rendered.