As I show you in my book, in version 12, the ripple feature is built around the Video 1/Audio 1 track. When you remove a clip on this track (and there are no other video or audio clips filling the gap on other tracks), the gap will fill in.
To remove the clip without rippling the gap shut, right-click on the clip and select Delete or select the clip and press Delete on your keyboard.
To remove the clip and ripple the gap shut, right-click on the clip and select Delete and Close Gap or select the clip and press the Backspace key on your keyboard.
A lot depends on the relationship of the gap to be closed with "Delete and Close Gap" command and what is above and below it.
Some supplemental Delete and Close Gap failures that I ran into and explored
And note that the ripple function works differently on a Mac keyboard than on a PC.