It's better to make a one-time investment.
According to the assumption you provided, if a large sum of money suddenly comes in,
then I would choose to make a one-time investment.
The reasons are as follows.
Based on the experience of the US stock market over the past hundred years, it has been continuously rising. Even in case of a decline, it is brief, around one to two years.
So it is very difficult to guess the price level.
If you choose regular fixed investment, such as dividing the same amount of money into two or three years or more to buy, although it seems to avoid the risk of decline, it also misses the rise, which may lead to buying higher and increasing the holding cost while reducing income.
If you choose to buy in one go, even if you encounter a decline later, in the long run, it will still rise back up. What if it continues to rise after buying?
Therefore, buying in one go is better than regular fixed investment.