I wanted to play a music in my motion graphic project. but when I wanted to play the motion, I couldn't hear any sounds from the music and also when I rendered it by media encoder and opened the last video, there wasn't any music sound!
We honestly can't know. You have not offered any info about your project, your render settings, preview settings, type of files used, audio preferences and whatnot. This is much more complex than just saying it doesn't work. You need to be much more specific and provide the necessary details. If the sound doesn't appear anywhere, then something is fundamentally wrong.