Planning a course: lecture-by-lecture or topic-by-topic?
Planning it in a continuous way and not lecture by lecture gives you more flexibility in the classroom as questions or other issues might interfere with your planning and therefore your planning doesn't work out anymore. On the other case, there is a chance that you won't plan enough for a lecture, so a continuous plan enables you to "fill" a hole, in case you'd advance faster than you have planned.

A lecture by lecture plan may be helpful as well, maybe not on a very detailed level. But writing down which topics you'd like to cover within which lectures helps in setting up an underlying structure of the course, showing the coherence of the smaller topics.

Going further, I'd like to add, that if you plan to write down what you are going to say, you might ask yourself the question if it is helpful for your teaching or the students learning if you hand out some form of lecture notes at the beginning of the course. I, as a student, enjoy having to take less notes and being able to focus more on what the teacher is saying. As a teacher, with lecture notes, I know for myself, that my lesson is carefully planned and that I have already done a good amount of work for next year. If you are concerned, that with lecture notes students attention may decline, I suggest that you leave out certain type of content, in mathematics e.g. examples.