Hello this is my first question, i am new for music learning and i am practicing the song "close to you" by the carpenters and i'm wonder how is the composer choose these chords and what these chords function are, for example at verse "C-Bsus4-B7-Bm-Em-C-G" how's B7 and Bm chord come from? And where should I start to learn to learn about this topic, what is this topic called, what are the books's name. Thanks you in advance for any help.
You are probably looking for harmonic analysis.
You can find most of the chords you mentioned in the G Mayor scale. How can you tell? You have a minor chord (Bm or III grade of G mayor) a half tone below a mayor chord (C or IV grade of G mayor). Bsus4 is just the III grade with an E (which already exists in the scale).
The one chord that escapes G mayor is B7 which tells us that the song modulated into a minor scale (better explained on the books :))
Any decent music theory book can help you understand scales and their chord structures. I personally liked Mark Levine's Jazz theory.
Hope it helps
This isn't a complete answer, because your question is fairly open ended.
In terms of theory, the progression is in Em, thus B is the dominant chord. Bsus4 maintains the E from the preceding C chord, B7 is the true dominant seventh and Bm is the minor dominant chord ('softening' the resolution), resolving to Em.