I replaced my fluorescent light ballast but the bulbs turn off immediately
I check the lamps first prior to changing the ballast because lamps fail more often than ballasts. If the ballast is bad, I usually replace the tubes with ballast bypass LED lamps. Good quality lamps are around 10-11 bucks. Look for DLC certification. The lamps that are not DLC certified do not tend to last in my experience.

I like double-ended LEDs because these will work with shunted tombstones (the part that holds the lamp); with single-ended tombstones you will need to replace them if shunted. To tell if the tombstones are shunted, with the power off use an ohm meter and measure the resistance from the 2 contacts. If reading zero or very low ohms, they are shunted.

Last, purchase from a vendor that has a long warranty - 5 years is my target. Some companies have good no-hassle warranties where you take a photo of the fixture with a working and failed light and they give you a credit or refund. Some companies require you to ship the lamps back as they no one will pay almost as much to return a lamp - those are sham warranties in my opinion.

To install a ballast bypass set of lights double-ended, 1 wire from each tombstone at 1 end can be wire butted together with the hot and the other end and 1 wire from each tombstone nutted to the neutral. The ballast can be left in the fixture but the wires should be cut or removed from the ballast and capped, cutting close to the ballast provides all the wire needed in hundreds of fixtures I have upgraded. Ballast bypass lamps usually come with a sticker that states the fixture was rewired and not to use fluorescent bulbs.

Earlier I used the term DLC certified. This stands for Design Lights Consortium. With this certification, you know that your lamps are efficient (not all LEDs are created equal) and meet the quality standards. Most power companies that provide rebates for upgrades require the new lamps to be DLC certified to get the rebates if available. In my area it is close to 70% of the cost of the lamp so this can bring your final cost to that of  quality fluorescents and now you are saving $ on your power bill and they have longer expected life.

Since you have already replaced the ballast try some new lamps. If the ends of the lamps are black or dark the lamp electrodes are probably gone, this is assuming you installed the proper ballast type for the lamps in the fixture. Universal ballast refers to the input voltage only usually 100-277v. Not long ago a friend installed a universal ballast in a 4 tube t8 lamp fixture, the lights did not work because the ballast was for 2' fluorescents.

I hope this information helps you troubleshoot your problem and or upgrade your lights.