I do not know of a single iOS email app where the app itself does any spam filtering at all. Spam filtering with gmail, yahoo, iCloud, etc is all done on the server side, not in the mail apps themselves.
You can login to your gmail, yahoo, iCloud or whatever service account online and see what spam settings they offer. Gmail, if set to IMAP will learn from whatever you put in the IMAP spam folder (make sure you have your iOS mail app set to save spam to the server’s folder and not a local folder). So does iCloud. Yahoo will also do so, but if using a free yahoo email account that is an advertisement based account, so it will inherently have a ton more cr8p emails than some other free accounts.
For optimal email spam control, I recommend getting a web hosting account, registering your own domain(s) and using those for email. My hosting service offers both algorithmic auto-spam filtering at various stringency levels, as well quite complex spam filtering rules (wild cards, Boolean strings, etcj as well as both blacklists and whitelists. Of all my email accounts (iCloud, yahoo, several gmail, and my own domain based accounts) by far the one with the least inbox received spam email are my own domain based ones, since I have by far more control over them than any others.