BASHOPTS not populated
There is no BASHOPTS
in the default bash included with macOS. The variable BASHOPTS was introduced with bash 4.1. The macOS operating system on Intel Macs with macOS Big Sur 11.4 only has bash up to the following.
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
I assume the M1 Macs offer nothing significantly newer. I heard this is basically a licensing issue causing the version to be this old. I believe you can manually upgrade to a newer version of bash if you wish.