How to enable circleci parallel feature with cypress tests?

The circleci documentation is great but it doesnt mention anything about splitting cypress test cases across multiple machines with parallelism feature enabled.

I have cypress tests in my application and I have configured 4 parallel machines on circleci. But I can not figure out how to use circleci commands to split those test cases. I followed a blog post and tried the below code but didnt work. Any clue of how to make it both work?

        - run:
            name: Run cypress tests in Parallel
            command: |
              mkdir cypress/tmp
              mv $(circleci tests glob cypress/tests/**/*.spec.js | circleci tests split) cypress/tmp
              [ "$(ls -A cypress/tmp)" ] && npx cypress run --headless --browser electron

All 40 test cases started running across all 4 parallel machines instead of splitting the test cases. TIA