USCIS says you can use any combination of names on the marriage certificate on the I-485. For example, if Mary Smith marries John Doe, Mary can use:
Mary Smith
Mary Doe
Mary Smith Doe
Mary-Smith-Doe
These are all acceptable for USCIS forms as new legal name.
https://www.uscis.gov/policy-manual/volume-1-part-e-chapter-5