You can use Portrait mode on your iPhone to take high-quality photos, as long your iPhone has at least two camera lenses built in.
To blur the background in photos on an iPhone, you can use Portrait Mode on newer iPhones, edit photos using an app, or take photos in a certain way.