Troubles using "Serial." library

This code should read the first 24 bytes stored in the buffer

Yes and you see that there is at least one byte to read and then you go ahead and read all 24 bytes when most of then have not arrived yet.