I heard that some new wheels spokes loosen up after the first few rides.
Yep you're right. They do. But they're the ones that were never built right in the first place. A good wheelbuilder will bed the spokes, straighten them, remove twist (windup) and a few other things in the workshop. Then this doesn't happen during your first rides - resulting in them needing re-tensioning and re-trueing. They probably didn't equalize tensions and apply sufficient tension too.
If new wheels ping during the first few feet of their first ride you can bet all these things were never done. It's all explanied in the info in my sig.
Short story - years ago I rode a mtb race circuit with a buddy who was bragging that he had built his rear wheel the night before. At the end of the first lap (about 20 minutes) he was complaining that his rear wheel felt loose and squirrely. We stopped to check it. The whole wheel had loosened off and the nipples were finger tight. I asked "Did you stress relieve the wheel?" His answer was "Huh, what's that?"
He's lucky we had a spoke wrench in the 3-man group.