Can I create my own 24 word system using JavaScript or Ruby? Ledger Nano X has a 24 word system.  So can I create this system on my own computer?
And I can use 3 words, 9 words, 24 words, just by a method like the following?

Say, for simplicity, if it is 3 words, &quot;apple&quot;, &quot;pisces&quot;, &quot;steve&quot;
Now I sort them, in alphabetically order, but no need to, because they already are sorted
Now use any package to create a Private Key A and Public Key A from them
Now, for the so valuable BitcoinPrivateKey of my &quot;address&quot; that has the bitcoin, use the public key in step 3 to encrypt it.
Now I can email this code to 20 of my friends or post it in my Google Docs or any website
So only the private key A can get back my valuable BitcoinPrivateKey, because that token I emailed to 20 friends, if I use the private key A to encrypt it (to pass through the private key function), then I will get back BitcoinPrivateKey. (that's the property of private key and public key, if f is a function of private key and g is the function of public key, then we know x = f(g(x)) and x = g(f(x)) meaning pass through f and then g, and you get back itself. Likewise for passing through g and then f, you get back itself.
So from now on, I only need to remember &quot;apple&quot;, &quot;pisces&quot;, &quot;steve&quot;, and I can generate Private Key A and Public Key A again. And then I can ask any of my friend what that token is, and use Private Key A to get back your BitcoinPrivateKey, and therefore get back my bitcoin and sell it.

Does it work?  Is there any online system that can do that? But that will mean we need to enter the private key on a webpage and let it go through the Internet once, with HTTPS it is better, but if that online system has some loophole, then the private key could have leaked.
You have reduced the level of security by making it so that an adversary only needs to figure out your three-word phrase rather than your 24-word phrase. Assuming 170,000 English words from which you derive your phrase, your three-word phrase only has 52 bits of entropy. In practice, it will probably be less than this because your set of words may not be sufficiently diverse or your choices may not be sufficiently random.
Of course, the adversary also needs to find the encrypted seed which you have sent to your friends, but that's a different matter, and socially engineering one person is still easier than brute forcing a 128-/256-bit key space, let alone socially engineering 1 of 20. Assuming the probability of the adversary successfully attacking a particular friend and getting the encrypted seed is 0.1%, the probability of them succeeding when you have given 20 friends the encrypted seed is 1.98%.
You're better off just using a BIP-39 seed phrase, writing it down somewhere (not sharing it with your friends) and using &quot;apple pisces steve&quot; or whatever as the BIP-39 optional passphrase, which you either remember or also record somewhere (not as important where, as long as the actual 24-word seed is stored in a safe, offline location). This would effectively result in a 27-word seed.
Consult this video by Andreas Antonopoulous for other reasons why you shouldn't devise your own schemes, and what you should do instead: https://youtu.be/jP7pEgBpaO0