Sewing seams

I just finished knitting a beanie, but to sew seams together I don’t know if it should be done on the wrong or the right side. Also, I’ll try the mattress stitch. Is that OK? Thanks a lot for your help:muah:

Mattress stitch is done on the right side, but it pulls your edges to the wrong side.