12 X 24 is 288, not 265. However, counting the lines in your story, I found that there were actually 25 of them. 25 X 12 = 300, whatever your word processor might say.
Some word processors and online word counting programs ignore certain of the smaller words. I don't understand the rationale behind why they do it, but there it is -- which is why we urge everyone to count their words by hand.*
In this case, you didn't go over the limit, but whatever program you used to count the words could trip you up in the future. Don't trust it.
*I use Appleworks, which I have never known to produce an inaccurate word count. I still back it up by counting the words in my stories by hand.