The federal reserve buys bonds in order to increase the money supply, as happened during 2020. It isn't allowed to buy stock. In 2020, the fed bought treasury securities, mortgage bonds and also corporate bonds for the first time (which might be what you are thinking of).
You can argue the purpose of these actions was to prop up the stock market, but I don't think they've ever intervened in as direct a manner as the Bank of Japan has with buying company stocks.