Hi, and welcome!
Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.
For this question, it's particularly important: 1) it's impossible to reverse-engineer the problem without the data and all the libraries and 2) the lavaan
questions don't attract a lot of answers, so there may be few in the community who can tell at a glance what may be wrong.