I would like to continue with my academic path but, the last year, I've been conducting mainly research activity with no teaching assignments. I would like to build up my portfolio to gain some teaching experience eventually thinking for a Lecturer/Assistant Professor position but, on the other hand, I would not like to hamper my outward mobility and compromise my research output. What would you suggest?
In part to forcefully disagree with @Buffy's remark that it's generally easier to move from research to teaching roles... my own and others' PhD students from my "R1" university in math in the U.S. have encountered disbelief about their sincere interest in teaching at an undergrad institution... Indeed, given the way computerized job applications often work (mathjobs.org), it's nearly effortless to apply to any place listed on mathjobs.org. In particular, making such an application is absolutely not a proof of sincere interest, beyond not wanting to be unemployed.
I suspect significantly for that reason, some (I don't know what fraction...) of non-research-fixated math depts in the U.S. simply do not list themselves in mathjobs.org, so that "the bar" to apply to them is set higher than clicking boxes.
So far as I can tell, "sincerity" (or its appearance, ack, ...) plays a significant role. I see this, and am not entirely opposed to it, in graduate admissions, postdoc applications, and tenure-track applications. So, if one intends to "game" the system (well, why not?) one needs to do so well enough to fool a certain number of people.
Depending on your personality, it might be less stressful to just follow the direction you want, rather than having your day-to-day life determined by some dubious long-term strategy.
This would depend on your overall goals. If you want a primarily research path for the long term, don't do anything that takes you away from research. It is much easier, I think, to move to teaching from a research track, if you so choose, than to go the other way.
The more research oriented the institution is (R1, R2) the more important it is to have a solid research portfolio.
But if you really want to move to a primarily teaching institution, of which there are many excellent ones, then some teaching experience, even as an advanced TA, would be the way to move forward.