When? Before you're first published, or simultaneously with your first publishing deal [so you can add writer/composer/publisher details at the same time.] Some publishers will add works for you once you are established with them.
I think, though idk whether absolutely a legal 'must', that you should join the one in your own country, assuming there is a clear-cut choice where you live. It's their job to deal with international payments & hand them on to you. They all take a cut, but as collection would be nigh-on impossible without them, it's worth it - better 50% of something than 100% of nothing. Periodically they want you to fill in US tax forms… I'm a Brit, so this is so I get taxed in the UK not double-taxed in the US too - this is probably why you need to join your own territory's PRO, for tax legislation purposes.
I joined PRS in the early 80s, simply because my record company sent me all the forms & said, "Fill these in".. & the money's ticked through ever since.
You might end up having to be in all 3 - PRS for the 'song', MCPS for the mechanicals [physical records/CD, online iTunes, Spotify etc] & also PPL, again for 'records' but also because PPL swallowed PAMRA*, which is [was] an organisation dedicated to getting you royalties for any record you played on but were not part of the 'band' & fully credited at the time.
If you're not a 'session muso' then you may not need PPL. For me, it's my biggest source of royalty income these days, because I played on a hit in the 80s, & it's amazing how the money keeps on coming ;)
For just 'library music' I'd think PRS may be sufficient, as there's really no mechanicals in that field; they pay to use, but it's all 'publishing' rather than mechs.
To be perfectly honest, I've never delved into quite who handles what in any specific detail, I just fill in the forms & let them deal with the rest. You fill in the claim, they get the money. You have to watch out for them assigning things to the wrong people, which sometimes happens if you happen to be Fred Bloggs 43, but it's really something you just check & correct if necessary maybe once a year or so.
I don't recall if any of them charged to join way back when I signed up, but 40 years down the road you'll be glad you did, every time that statement drops through the letter box.
In 1996, performers were given the right to receive ‘equitable remuneration’ where recordings of their performances were played in public or broadcast – leading to PPL paying them royalties directly for the first time.
PAMRA merged with PPL a year later.
Also see - Music Gateway - PRS For Music (PRS, MCPS) & PPL: UK Collection Societies Explained