The preference option doesn't exist anymore. You will need to right click the res -> new -> Android resource file and choose the resource type as xml in the dropdown. Then you will manually need to add the layout for preference xml.
How do I change preferences in Android Studio?
Click File > Settings (on macOS, Android Studio > Preferences) to open the Settings dialog.
How do I set preferences in Android?
Another way of creating a Setting Activity is to go to your Java/Kotlin code folder in your Android project and then right click > new > Activity > Settings Activity. By adding a Settings Activity, you will be given three options as below: Here you will get options like: General: You can change the Display name.