could be any number of things, but its almost certainly not the battery or the starter motor.
Not very helpful I know, but probably time to take it to a garage for proper diagnosis – or (and this is the route I would take) wait for the problem to become more apparent/consistent then take it to be diagnosed.
The problem with ‘intermittant’ issues like yours is that the garage will almost always fail to replicate the issue, and/or they will change something declare it fixed, only for you to discover its not fixed, you then enter a very frustrating cycle of fix/not fixed at great cost.
Assuming its a petrol, it could be any of the following:-
fuel side of things:-
– Air in fuel (leaky fuel filter maybe?)
– Worn fuel pump
– worn fuel pressure regulator
– dodgy/blocked injectors
– dodgy/blocked fuel hose/filter
spark side of things:-
– dodgy spark plugs/wiring
– dodgy coil pack/wiring
electronics side of things:-
– a sensor failing somewhere
Switch headlights on and windscreen motor on, then switch ignition on, wipers slowing down or stopping means dodgy battery,
Every car I’ve ever owned does this, its definitely not a valid test for a dodgy battery