"If I can stop one heart from breaking" proclaims the value of even the smallest acts of empathy and kindness. In the first two lines, the speaker sums up the whole poem, arguing that saving one "heart from breaking" would make their own life worth living:
If I can stop one heart from breaking,
I shall not live in vain;
Of course, there's an important truth about the world in the speaker's words here: life is full of suffering. The speaker's wish to stop "one heart from breaking" implies that there are countless hearts out there being broken—which, of course, is true! Starting the poem with this time-worn metaphor, the speaker suggests the universality of pain. The spiky /t/ consonance in "stop" and "heart" here suggests the piercing emotional pain these lines describe.
Take a look at the meter of these first two lines. This poem is mainly iambic: in other words, it's written in iambs, metrical feet with a da-DUM rhythm. Here's how that sounds:
If I | can stop | one heart | from breaking,
I shall | not live | in vain;
Notice that the longer first line (which is written in iambic tetrameter, a line of four iambs) here has what's known as a feminine ending—an extra unstressed syllable at the end. Like the /t/ consonance, this choice reflects the emotions the speaker is describing: that last syllable, dangling there all alone, sounds rather broken-hearted itself!
The punchy three-iamb trimeter of the shorter second line, by contrast, firmly states the speaker's intention to do good in the world: it sounds stronger and more purposeful just as the speaker resolves to be strong and purposeful themselves.