A flush beats a straight. That's why the other guy won the hand.
Here is the rankings in order!-----
Royal FlushThe best possible straight flush Ten, Jack, Queen, King, and Ace all of the same suit.
Straight FlushCards of five consecutive ranks, all of the same suit
4 of a KindFour cards of any one rank, and any other card
Full HouseThree cards of one rank, and two cards of a second rank.
FlushFive cards of the same suit that doesn't make a straight
StraightCards of five consecutive ranks when not all five are of the same suit
Three of a KindThree cards of the same rank and two unrelated cards
Two PairTwo cards of one rank, two cards of another rank, and a fifth
One PairTwo cards of the same rank and three other unrelated cards
High CardKnown as a 'Busted Hand'. Five unrelated cards – no pair, no flush, no straight. Nothing.