Jocelyn asked her mom, "What was it like when you were a child?"

Did I punctuate correctly?

Right.

Yes, you punctuated the sentence correctly. The sentence you provided is a direct quote, so you correctly used quotation marks to enclose Jocelyn's exact words. Additionally, you used a question mark at the end since Jocelyn's statement is a question. Well done!