A compressed public key is 264 bits long which is 66 hex characters. You drop the 256 bit y coordinate, and change the prefix byte to either 02 or 03 depending on whether the y coordinate is even or odd.
I have a little question about the prefix byte. When you say that y coordinate is even or odd you mean on what number the entire hex ends?
For example
02f9fd63b1121b8872d6184b39e97972cd636e76a0fa9c67a74b1b7156791f1381 starts with
02 so it's even, but ends with 1 so it can't be even. How do I understand if a hex needs a
02 or a
03?