In my experience there is no general rule.
Most, but certainly not all, illegitmate children were baptized under the mother's name.
If the father acknowledged paternity then the child often later assumed his name.
Presentments often named the father.
Court records contain many maintenance orders and agreements.