Typically it works like this: Mail app sends request to Yahoo server asking for new messages, and if Yahoo server responds to request that there are new messages found, Mail app will start the download process unless server won’t allow it.
So, if for sure there are new messages found in Inbox on your Yahoo account, unless Mail app prompt you with the message (in place of “Checking for mail”) that there is an error communicating with Yahoo server, the issue is rather on Yahoo side.
You can try to remove the account in Mail app and add it back after you restart your iPhone. If that won’t work, contact Yahoo for help.