When I tried running DOSBox-X on my MacBook Pro with macOS Monterey (this seems to have better compatibility/performance on macOS than the original DOSBox), a window popped up saying DOSBox-X cannot be opened because the developer cannot be verified. The window only offered two options–Move to Trash or Cancel. I could not override this and run the app anyway from the popup.
To get around this, I found a support article from Apple. I had to open System Preferences > Security & Privacy. At the bottom of the Security & Privacy window, DOSBox-X was listed as an app that was blocked. Here there is a button to allow it to Open Anyway. Once I clicked on that, I was able to run DOSBox-X successfully.
I was used to seeing window popups like this for apps I download, but usually there is a button in the popup that allows me to run the app anyway. In this case it took some more digging.