It’s probably not a true fluid simulation. Ignoring the ripples you can probably get most of the way there by using blend modes to mask the colored rectangles inside the test tubes. If you calculate the areas that the fluid makes in the tube you probably can adjust the height of the rectangles to make it more convincing, but you may be able to get by without that.
The pouring mostly just would involve checking if the top of a rectangle was higher than the lip of the tube, then placing a vertical column for the pouting into the tube below. Then just gradually lowering and raising the two rectangle heights. You could adjust the column width based on the rate or whatnot.
The ripples could be added later. They probably are just looping animations, but I guess you could use mesh distort to move the top edge of the sprite in a since wave. Seems fiddly though.
Considering the behavior of the pouring is very consistent in those games I’d imagine they mostly just reuse a bunch or premade animations instead of something technical.
Four animations for pouring out of a test tube at the four levels, and four for pouring in for the four levels. Probably less if they are clever.