Don’t repeat doesn’t mean repeat for typing but repeat for thinking. If the two similar codes serve different purposes/concerns, then it is fine to get WET (Write Everything Twice).
When we DRY wrongly, we start to smell change preventers called Shotgun Surgery or Divergent Change.
Some tales tell that we need to wait to see three occurrences of similar codes before putting it as one function (Rule of Three).