The name of the song already appears in the History tab (click the clock icon to the left of search). You can copy its name from there (or open it right in Apple Music).
@Jacob, actually… I think I originally posted this request because of an error where song info is not being saved to the history. Because of why I probably had not found any song history info in the app.