How to List All Open Windows on a Desktop

The above thread now has a solution to the Original Question in the current thread.

Chris's @ccstone's solution above is rather slow. It generates a list of all apps and then loots at each to see if there are any windows in the current Desktop. It can take 15 seconds for me on a 2019 Mac running Monterey.

The above referenced thread about the "Second WIndow" has a JXA script, initiated by @CJK, enhanced for KBM by @_jims, and with a crucial permissions issue fixed by @griffman, that not only lists all active windows in the current Desktop space, it lists them in order from front to back. And it runs fast. Even with 20 windows open, it pops up a list in a fraction of a second.