expression, godan verb (-ru)
to assume a new surname; to change one's family name
Used when someone takes a different surname, typically through marriage, adoption, or legal name change.
結婚して姓が変わった。
My surname changed when I got married.
養子に入ると姓が変わることもある。
When you are adopted, your surname may change.
改姓 is a noun meaning 'changing one's surname' and is more formal; 姓が変わる is a verbal expression describing the change itself.
Phrase composed of 姓 (surname) + が (subject marker) + 変わる (to change).