Any bored Entertainment Lawyers want to answer my question?

Songwriter writes a song (music and lyrics). Artist performs and records song. Songwriter pays all studio and recording expenses. Who owns song? I assume the Songwriter holds the copywrite to the music and lyrics. How about the Artist’s recording? What if the rendition is eventually produced and marketed? Who is entitled to be compensated? What if Artist does not want the recording to be distributed? Any help appreciated! Thank you.