I wanted to know from you if Apple for a small app, could publish it if it is compatible for only one device like the iPhone 15
Could Apple publish an app to me if I make it available for only one device?
What do you mean if it's compatible for one device? When you make an app it is by default compatible to the latest iPhones , you don't have to do anything or worry about it.
Moreover if your app is made using SwiftUI it is almost compatible across all of apple's platforms without any major changes to your code.
Don't write apps for only one device. It will be rejected. And don't write apps that don't support all devices in that family (iPhones, iPads etc.). It wll be rejected.
You have to write your apps so that anyone using any device can use it. Can you imagine buying an app for your iPhone 15, then in a year you get an iPhone 16 and it's not compatible? You, as a customer, would be extremely annoyed.
Just work out your interface so it fits all devices. Xcode's preview functionality is pretty good.
Why would you need it ? To make it easier to develop ? But that's a bad reason seen from user.
And Guidelines state:
2.4.1 To ensure people get the most out of your app, iPhone apps should run on iPad whenever possible. We encourage you to consider building apps so customers can use them on all of their devices.