That has happened to me a few times over the years. Sometimes, rebooting fixed the problem but, more time than not, there was a hard to find unread email (usually a reply chain) I had to track down.
Not sure then. It's been that way for years with me regardless of 2 devices or 6, badges never update unless I open the application on macOS or iOS. Pretty sure it's just the way Apple pulls emails from the server.