Thank you for using Apple Support Communities! I understand that music on your MacBook Pro does not appear on your iPhone X. Being able to listen to and enjoy your music across devices is important. You've come to the right place for help.
If you have an Apple Music subscription, let's start by enabling iCloud Music Library on both the iPhone X and MacBook Pro. iCloud Music Library with an Apple Music subscription allows you to access your music library across all of your devices as long as you're signed in with the same Apple ID. The following resource will walk you through how to turn that setting on: