Welcome to the forum.
We need a reproducible example (reprex) to get some idea of what you are doing.