VBO rendering

Ive got some code thats rendering objects to the screen using a vbo, but i feel it’s very inneficient

For example, if i wanted to render a cube i would need (6 faces * 4 vertices) 24 vertices to make one cube when in reality it only has 8

Is there anyway to sort this out?