Hello and welcome to moodle.org.
You can change a word or phrase in Moodle using the language customisation feature. Please see the documentation Language customisation for details.
However, if you only want to change Teacher to Lecturer in a few courses, you can do so in the course settings, in the section titled 'Role renaming'.