Less on the device and more on the keyboard. On Android, you can install third-party keyboards like any other app, and there's a wide range in quality. The default Android one is decent, but not among the best.
I've been strictly a Sony Xperia user for almost 15 years now, and Sony had its own keyboard app early on, which they later discontinued. Swipe typing on the Xperia keyboard is still the fastest and most precise I've ever been able to write on a phone, nothing else ever came close. Then they stopped development and moved over to a Microsoft keyboard, I think. I've never found another keyboard that did swipe typing as well as Sony.