On the Goo thesaurus page, it says:
I'm not really sure what 名前のつけ方 is referring to here. When exactly should one use 姓名 over 氏名?
Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It only takes a minute to sign up.Sign up to join this community
The representative phrase that contains 姓名 is 姓名判断, which is based on a superstition that the fate of a person is determined by the number of strokes of each kanji in their name. This is surely related to 名前のつけ方 or how to name [a child]. This is a fixed phrase, and you cannot replace 姓名 to 氏名 here.
Aside from this, 姓名 may be used in stiff and formal contexts where one wants to say "the surname AND the given name, not only just the surname" explicitly. For example, you may see 利用者の姓名を記録すること in a formal documentation. Technically 氏名 should be enough, but it sounds less explicit.