The other comments correctly explain why an index fund is probably better suited, and will preserve more value by having lower fees. But I will propound on why "universal life insurance" (whether indexed or not) might not be a good fit for you.
To explain, I have to start with what the point of life insurance even is. At its core, life insurance is supposed to provide some benefit to replace your life. That is, ~~if~~ when you die, you would no longer be generating income to support your family or to honor your debts (only those which continue after you're dead). Without the benefit of life insurance, the consequences might include destitution for anyone that depends on you, as well as possibly a forced sale of the family home if the mortgage goes into default. In a nutshell, if correctly set up, life insurance should approximate the value of your life, the same way that car insurance should make you whole if something happens to the car.
(I recognize that this sounds extremely morbid, to put a price on your life. But with the current socio-economic system, this is a necessary exercise)
A reasonable approximation for how much life insurance to buy is to consider how much monthly income would it take so that your family could continue as-is financially in the event that you disappeared from their lives. If the amount will cover everything from inflation, to future college funds, plus retirement savings that you would have made, then that's probably the upper-limit for the correct amount of benefit to purchase.
If you have no debts, and have no family to support, there's little point in buying life insurance. Indeed, it's not terribly profitable for insurance companies to offer just life insurance, which is why they market other types which are partially life insurance, and partially an investment. Every form of life insurance -- except fixed term life policies -- have this mix.
So the question is, do you need life insurance right now? If no, then a dedicated investment vehicle -- like an index fund -- would make more sense. And if yes, then fixed term life insurance makes more sense because it's cheap and doesn't muddle your investment portfolio. If your answer is "no, but I might need life insurance later", then with very few exceptions, you would just wait until you do need that insurance and then buy a fixed term life policy. You save money by not buying a policy earlier than you need it, but pay for it by a higher premium later in life, precisely because you're closer to death's door than you were earlier. So it's mostly a wash.
I'm of the opinion that mixing one's insurance objectives with one's investment objectives is a recipe for disaster, with the extremely narrow situation where the quirks of USA tax law means that wealthy, savvy people that plan ahead could save some tax dollars. Maybe.