For such a small amount, most institutions won't offer you a loan because there's not enough principal to generate a meaningful amount of interest. In other words, they don't make enough money off you to make it worth the hassle.
You could use something like the "earnin" app. From the FAQ they essentially give you an interest-free loan of less than $100, that you pay back when your next paycheck is deposited into your bank account. You can "tip what you think is fair", which is how the app is supported.
Note: I am not affiliated with earnin and I have no experience using their (or any similar) app. Do more research before you give or receive any money. As others have mentioned, if you don't have $20 available to you then you shouldn't be borrowing to invest it anyway.
Edit to address your "why not" question concerning the last point:
There are many reasons why it's not a good idea to borrow $20 to invest, but here's two that immediately come to my mind:
- Fees will take up a very large portion of your investment. A lot of brokers charge $5 or more per trade. Each trade of $20 is then essentially reduced by 25% before you even have the money invested. Of course, if you used Robinhood or other brokers with no-load mutual funds or commission free ETFs, you can avoid this.
- Borrowing to invest puts you in a situation with unnecessary risk. What happens if you invest $100 in the "next big thing" and then you lose 10%, 50%, or 90% of that investment? Now you have lost all your money, but you also have a debt that is due soon. No one can predict the market. Sure, you might turn your $20 into $200 but what makes you think you will?
There is nothing wrong with investing small amounts. In fact, if you have an extra $20 then it is a great idea to sock that away each month into a well diversified portfolio (assuming a long event horizon of at least 5+ years). Some may say that borrowing to invest is a good idea, but only for young people and only if you really understand the risks. However, you are right that the majority of people on money.SE and elsewhere would advise against it, myself included.
If $20 is such a small amount to borrow, then why put yourself in debt rather than just save what you have?