First what is an IPO? It stands for initial public offering and it means a company is now listed to trade on one of the exchanges, New York or NASDAQ in the U.S. It is a common way that founders and investors of the company can finally cash out. They can now sell their ownership of the company to the public.
When a company goes public and starts trading, you the individual investor, can now own the company. Why would you not buy it? For one reason, if it is a popular or very successful company that is going public you will not be offered shares at the IPO price. You will be forced to buy it on the open market when it starts trading and it will likely be much higher than the IPO price. If it isn’t then the company has issues of some kind so why buy? Also, insiders have to hold on to shares for at least 6 months and then they can sell into the public market. This usually drives down share prices. Most IPO sell below their IPO price at this point.
There is no compelling reason why an investor should buy an IPO despite those few companies whose stocks go up and never look back after their first trade, and that is rare.