I can remember this trade-off myself in the Australian research context. This is similar to various decisions: i.e., continue doing a post-doc or apply for lecturer positions, take a second post doc or a lecturer position.
For this answer, I assume the academic model common in the U.K., Australia, and New Zealand where "Lecturer" generally represents an entry-level post-PhD teaching/research position that is commonly continuing (i.e., something a bit like a tenure track position in the U.S.).
Here are a few things to consider:
Job Security: Getting a continuing position is a major challenge for many researchers. If you are able to get such a position, you have a guaranteed income and a way of staying in academia to achieve your research goals in the longer term. If you take the post doc, there is a risk that you may struggle at the end of your post doc to obtain such a position. But equally, if you are a real research star, this might be a smaller risk.
Academic autonomy: In general, when you have a lecturing position, you are broadly free to do research in the area of your choosing (at least within your relevant discipline). In a Post Doc, this may be the case or you may have to align your research with the nature of the funding. Whether you experience this as constraining will depend on the alignment of your interests with the PostDoc.
Research allocation: If you are motivated by achieving great things in research, then you will be interested in the amount of time the position permits for research. Lecturer positions are highly variable in how much time they permit for research. There are so many different models for allocating service, teaching, and other responsibilities to academics. Furthermore, once you have been allocated various non-research tasks, academics vary in the effort that they apply to such tasks and their efficiency. And this changes over time. So, when you first start teaching in general and when you start teaching new units, the time you need to put in is much greater. In summary, some Lecturer positions may permit you to have a large amount of research time, whereas others will give you almost nothing. If research is important to you, then you should learn about the likely model at the institution that you are considering. In contrast, most Post Docs are entirely or almost entirely research focussed.
Mentoring and research support: You should consider the extent to which the research environment at the two institutions would support your research goals. What collaborations would the roles provide? Who would be mentoring you at the two places? One benefit to consider regarding Lecturer roles is that you may be more able to supervise research students.
Location and life: Consider where you would ultimately like to live and work. If the Lecturer position opens up in a place that you'd like to set up your life, then that can be well worth taking advantage of.
Money: Money varies in importance to people. Money includes both salary while doing the role and future income. It can be hard to predict but in general a Lecturer position will pay more in the short-term.
These are just some of the Trade-offs. I've seen many researchers set up successful academic careers using both strategies (i.e., the prestigious-post-doc strategy and the early-take-up-ff-Lecturer-position-at-mid-tier-university strategy).
Finally, there is a difference between having both offers in front of you and considering applying for one or both positions. If you are only at the stage of considering applying for positions, you essentially have neither a second Post Doc nor a Lecturer position. Depending on your confidence in getting these positions, it is often helpful to apply for more things to ensure that you will have at least one good option at the end of the process.