If just before the split was announced you had 10 shares and the price was $100 per share, then your investment was worth $1,000.
If shortly after the split was announced it started going up and at the key moment of the split it was worth $120 per share your investment would be worth $1,200.
Just after the key moment you would now have 40 shares and they would be worth $30 per share. You investment would be worth $1,200. the number of shares is multiplied by 4 and the price is divided by 4. The splitting event doesn't change the worth of any investors investment.
This is covered in the NVIDIA 2021 Stock Split Frequently Asked Questions:
What is a four-for-one stock split in the form of a stock dividend?
A stock dividend is a common way to implement a stock split. On the distribution date, holders of the company’s common stock will receive three shares for each share they hold as of the record date. The result will be a stock split where what was once one share is now four shares, and the trading price will be divided by four.
Splitting doesn't make investors rich. It is the movement because of the announcement, and the belief that it is a good thing that increases the value of the investment. Buying between the announcement and the key moment allows some current investors to cash out, or people who buy quickly to make a profit during the short time they own the shares.