There is nothing to worry about this, that probably was a puncture in the past or a near-puncture. I have used a bike having tires with damage larger than this.
If you remove the tire and look at it from the inside, if the inner structure of the tire doesn't have a large hole, you are fine. If it does, install adhesive high pressure cloth rim tape on the inside of the tire to prevent the inner tube from being visible, and closely monitor the area for any bulges.
The times to replace a tire are when the sidewall is damaged, or you see a bulge in the tire, or the tread is so worn that the cords start to be barely visible (except on a mountain bike you probably want to replace earlier than when the cords become visible, because a MTB requires the traction on mud that tread pattern gives you). Until that, to save your money, it's repairs and not replacement.
By the way, have few spare inner tubes, a spare foldable tire, patch kit an tools to remove and install a tire with you at all times during the bike trip.