We are all talking about it these days, so I thought you might like to see the tools that Doctors and Nurse Practioners use.
There is the Mini Mental Status Exam. This is used to give some insight into many cognitive skills.
And the Montreal Cognitive Assessment (MOCA), which is more sensitive to early detection of dementia
You have to learn to administer them properly, because there are subtleties such as "Subtract 7 from 100...now subtract 7 from that..." rather than saying "...Now subtract 7 from 93..." and reasons why that extra difficulty is important. There are variants and older versions of the test. I miss that younger psychiatrists are less likely to ask the questions about abstract reasoning "What does this saying mean to you 'The grass is always greener on the other side of the street,'" followed by the more difficult "People who live in glass houses shouldn't throw stones." For that second one, jump on it quickly and try - you will see that you know the meaning, but have to hesitate a bit to find quite the right words. If you imagine yourself being examined, and know this is important, your anxiety goes up, and you might panic and fumble even more, thinking Oh my god, he's going to think I'm stupid! Well, anxiety is one of the things being evaluated by the test. Any reasonable clinician knows that you are not likely to be at your best when the police have brought you in to the ER at 2AM. It's worse if you aren't even a little nervous, as that means you really don't understand what's going on.
No, no one is going to be asking Joe Biden to subtract 7 from 100 on the record, and anyone who pulled that at a press conference would be out of the White House Press Corps immediately.