Programmable filter general question

Hello all!
Hope all is well. I have just started learning about programmable filter and source in Paraview and I would really appreciate any help.
I am working on a problem where a solid body is moving in a fluid. I have the coordinates of center of mass of this solid object at each time step in a .csv file. I want to isolate the fluid that is within a certain distance to the solid. The way I have been doing is to import the .vtk, add an ExtractCellsByRegion filter, use the coordinates from my .csv to set the location of the region and then perform further operations. Although this works, it takes really long to manually do everything considering there is quite a lot of time steps and different .vtk’s corresponding to different cases.
I was wondering if I could create a programmable filter where I could read the coordinates at each timestep, create the region based on that, extract fluid particles and get histogram of the extracted region.
I honestly do not know where to start, if you could point me in the right direction that would help a ton.

Thank you!