If you just want to display line numbers, click the cursor position indicator in the status bar at the bottom (which looks like "Ln x, Col y") and check "Display line numbers".

As mentioned in the answers by @vanadium and @karel, the "Preferences" option has been moved to the "App Menu" in the top bar next to "Activities". But if you wish you can bring it back to the application window using (GNOME) Tweaks to get a behaviour closer to the older release.
Launch Tweaks and go to the "Top Bar" section. Then toggle the "Application Menu" option OFF.

Then re-login or restart GNOME shell to be sure and you should see something like this:
