If you have already purchased Motion, it's easy. Log in to the App Store, click on your account, and download from your list of purchases (not by searching for Motion in the App Store at large).
If you haven't, you need to purchase Motion using a Mac running at least Sonoma (14.6, I think).
You could install Sonoma or Sequoia on an external drive, and boot from it to make the purchase; or you could ask a friend to let make the purchase - using YOUR Apple id - on a much running such an OS.
Then back at your mac, do as above and you will get the version that works in your OS.