Word has been tweaking its grammar checker regularly since the introduction of Word 2016. What you are experiencing is a part of that. It is annoying. The alert for the wrong number of spaces just changed, as well.
Suzanne has shown you how to change the grammar settings. The one for one or two spaces is there, too. It is not a checkbox but a drop-down.

The change to one space came with the introduction of proportionally-spaced fonts. Both Suzanne and I learned to type on typewriters. For me it was on a manual typewriter. Those had mono-spaced type. The appropriate space is built into the font. If you are
typing using Courier font, by all means keep using two spaces. Here is the Chicago Manual of Style on the subject:
https://cmosshoptalk.com/2020/03/24/one-space-or-two/