Modeling both mean and variance in a linear model I have a variable $X$ that decays log-normally with time, and I have estimated the mean and the SD of that log-linear relationship. I also have a (categorical) variable $Y$ which—I hypothesize—will affect linearly both the mean and the SD. It is this variability between $Y$ and the mean and the SD that I am interested in, and my question is what model is suitable for this.
I have been searching for it and, apparently, what I am looking for is a GLM of the gamma family, but I am not sure why or if there are better alternatives to it. I would appreciate any hint.
Edit: As requested, I give more details and context. In the real world, $X$ represents the level of a certain biomarker of inflammation, which decays log-normally with time, $T$, the range of which goes from 0  (the first measurement) to 120 hours, i.e., I have several measurements per patient, and I have around 1000 measurements overall.
I have another variable, which I called $Y$ in the pre-edit text, which is the type of surgery undertaken by the patient. This is a binary variable ("minimally invasive surgery", "not minimally invasive surgery"). I want to know how this variable (and, potentially, others) affects the mean and variance of the log-normal relationship between the levels of the biomarker and time.
Edit 2: As requested, I provide a plot of the relationship between $X$ and time. I would like to build a model that allows me to simulate data with the same distribution as you see in the image, but taking into consideration the fact that patients may have undertaken either minimally invasive surgery or not minimally invasive surgery. I mean, I don't want "two curves", but addressing the variability in the mean and the SD that the surgery variable introduces.

 A: The closer you can bring your model to underlying biological reality, the better. Just fitting an arbitrary distribution to a set of data won't be nearly as satisfying.
The data (plotted on a log scale) look pretty much like they follow a broken stick: a straight upward-sloping line (representing an exponential increase in the original concentration scale) up to about 24 hours, followed by a straight downward-sloping line thereafter (representing an exponential decay of concentration). On the log scale, it looks like the spread of data around those 2 underlying trends is reasonably constant over time, on the order of 1 to 1.5 log-10 units.
So a change-point analysis based on linear modeling in the log scale of concentration seems like a more promising approach. For your data, with a single slope breakpoint in a continuous variable, the segmented package in R might be the simplest of several that allow for such analysis. In particular, you will be able to include the binary surgery-treatment variable as a predictor in the model and directly test what seems (from a comment) to be the main hypothesis: that the type of surgery treatment affects the exponential decay rate.
There will be a few complications with this type of repeated-measures data. For one, the multiple measurements on individuals mean that the observations will not all be independent. Ideally that should be taken into account in terms of differences among individuals in biomarker levels or slopes with respect to time, for example treating those as random effects in a mixed model. (With only 3 or 4 observations per patient and breakpoint times and slopes and intercepts on both sides of the break to be estimated from the data, treating patients as fixed effects probably wouldn't work.) This page discusses how to include random effects into change-point analysis. Or you might find a way to incorporate the change-point analysis into nonlinear modeling and use the nlme function in its eponymous package to handle the random effects.
For another, the paucity of data beyond 48 hours suggests that there might be some systematic differences between the patients who were followed for a long time and those who weren't. That would need to be investigated, along with any systematic differences between the patients who received the two types of treatment.
