The first rule to remember is that, for everyone who has made it big in the stock market, there's probably dozens or hundreds of others who lost a lot of money in the stock market. There is potential to make a lot of money in the stock market, but there is much more likelihood to lose money. There are things to always remember, in order to not make regretful decisions.
Unlike the Youtube ads or videos, I do not presume nor profess to have everything figured out. As is the experience of many young investors, I have only been invested in the stock market throughout a bull run (a period of time when stocks have been going up), and it is important to be cognizant of that. When everyone is making money, it's not that impressive to be making money. It's only through much time and passing through downturns that investment strategies are validated. Today, I want to explain the framework/mindset as well as the attitude I have that has made investing a mostly positive experience.
Framework / Mindset
The stock market tends to go up over the long-term - a statistic that everyone who's trying to get people to invest into the stock market is that the stock market has, on average, returned 10% before (or 7-8% after) inflation over the past century. Thus, when you take the big picture view, the stock market trends upward over time. Despite the daily fluctuations, this trend has held up consistently.
The stock market goes up and down over the short-term - few people who are trying to get people to invest into the stock market will readily admit that the stock market can go down. But, the stock market does go down, even if only temporarily. When it does, it is a trying time for investors.
The P/E ratio (stock price vs earnings - how much a company makes) averages at around 16.5. This number is important, as it is an indicator of whether a stock is overpriced or underpriced. While the stock price can become decoupled from reality, earnings are reality - how much money the company is actually making. If the P/E ratio is too high, then the company's stocks are very expensive given the money they are making, at least currently, though earnings could eventually catch up to the price if the company has a lot of potential. If the P/E ratio is too low, then the company's stocks are very cheap given the money they are making. It should be noted that a company's debt is not reflected by this otherwise useful metric.
Avoid being a speculator - speculation is gambling. A speculator buys a stock when (s)he thinks the price will rise, regardless of the financial fundamentals (how much profit or how sustainable the business model is) of the company behind the stock. (S)he dumps a stock when (s)he thinks the stock price will fall. Often, a speculator does not know the actual business of the stock (s)he is buying, but is guided primarily by history - the flawed notion that a stock with a rising price yesterday will rise tomorrow. Thus, when the stock price rises, the speculator buys, and holds onto the stock, waiting for it to continue to rise. Then, when the stock price falls, the speculator panics, and sells the stock, hoping to get out before (s)he loses everything.
Control your emotions - don't get carried away by the winds of the general stock market mood swings. As Warren Buffet once said, "Be fearful when others are greedy and greedy when others are fearful." It is worth considering that when everyone is afraid, panicking and selling, stocks tend to drop in price, sometimes below the sum of a company's assets - meaning that if someone bought all the stock, shut the company down and sold all the things it had, (s)he would still profit. Conversely, when everyone is exuberant, and willing to pay any price for stocks, sometimes pushing the price up to insane levels for companies that are not making money and don't have a clear path to make money, that is when buying stocks are a very bad deal. Getting caught up in the general sentiment results in buying high (when everyone is greedy) and selling low (when everyone is fearful).
Buy low, sell high - as long as a company doesn't go bankrupt, it could turn its business around. The lower you bought a stock at, the sooner it will be to be in the black (making gains). Temporary drops can be ignored if the company has solid fundamentals and a bright future. Buy underrated stocks and sell overrated ones.
Don't be greedy - a futile exercise people sometimes do is to daydream about how much money they could've gained if they had timed the stock market, meaning that they bought and sold at precisely the best times. The truth is that the future is unpredictable. Tomorrow, the stock market could go either up or down. Imagining what could've happened if you did things differently is an exercise in frustration. Either sell, cash out the profits, and move on without looking back, or wait patiently for a stock to go back up if you missed out on selling it at the price you wanted. Either buy the stock now at its current price, or wait patiently for the stock to drop back down to the price you wanted to buy it at.
Put yourself in the best position (financially, mentally, and physically) for the widest range of possible outcomes - if the stock market gained 50% tomorrow, would you be kicking yourself, wishing you had bought more stock? If so, then re-arrange your portfolio in a way so that you won't. If the stock market lost 50% tomorrow, would you be kicking yourself, wishing you had sold for gains or had cash to buy in? If so, then re-arrange your portfolio so that you won't. Planning for unforeseen circumstances is the key here, and thinking about unpleasant situations is something that's necessary from time to time. Investing isn't binary - you don't have to be all-in or on the sidelines. Arrange your portfolio so that you can respond to your satisfaction to the unforeseeable future.