There are several possible causes of the problem, most associated with winter temperatures.
My municipal water source is surface water, which drops to about 35 F in the winter. That puts a greater demand on your tankless water heater.
You might check whether your boiler is running when you run out of hot water. Your boiler should have enough hot water in it to give you one shower, but if it doesn't come on when the temperature drops, you will run out of hot water.
I had a problem when the tempering valve failed in a way that let cold water mix in at all times. That didn't matter in the summer but gave me cold showers in the winter. I took the control stem out of the valve until I got around to replacing it.
When your circulator is running, it takes heat from the system and reduces the capacity to produce hot water. There is usually a boiler control to prevent the circulator from running when the boiler temperature drops below some setting, usually around 160 F. If the circulator continues to run and the boiler can't keep up, you will get cold showers.
My Honeywell Aquastat temperature settings got out of whack to the point where the actual temperatures were much higher than the settings. I tried for a while to apply "Kentucky windage" to keep it operating correctly but finally had to replace it.
One thing you might find with your tankless heater is that you use a lot of fuel in the summer just to keep the boiler hot. I found that I was using so much $2.00 per gallon oil that it was costing more for oil than it would cost for electricity. I installed a 40 gallon electric hot water heater in series with the tankless coil and shut the boiler off in the summer. The water is heated with electricity in the summer and with oil when the boiler is running in the winter.