Lights wont turn off after switching dimmer types and changed again
Every switch sits in-between two hot wires. One is always hot, from the mains, and one is hot when the switch is active, and that one goes to the controlled device(s).

It sounds like you have connected the hot wire (black) from the mains directly to the hot going to the fixtures. The always hot switch should be connected to one black wire on the dimmer and the black from the fixture to the other black on the dimmer. Check the dimmer to see if there is a marking to indicate which is which.

The easiest way to test which black wires are which is to use a non-contact tester. Turn off the breaker. Separate the black wires, put a wire nut on the exposed end of each and turn the power back on. Check each black wire to see if it registers as hot on the tester. The one that is hot is the mains. The one (or more) that are not go to the fixtures.

In general, all white (neutral) wires are connected. This assumes the white wire is not being used as a hot line. If it is, it should be marked with a black marker or a piece of black tape. Similarly all greens and bare wires (ground) are connected.

Some dimmers need a neutral wire and some do not. It sounds like yours does. It should be connected to the other neutrals. Similarly the grounds should all be connected.