There are various features that affect "targets within X feet".
For example, the Wild Magic Sorcerer's Wild Magic Surge table (PHB, p. 104) has the following result on a d100 roll of 83-84:
Each creature within 30 feet of you takes 1d10 necrotic damage. You regain hit points equal to the sum of the necrotic damage dealt.
Do you take this damage as well and then immediately heal it? (Thanks to user @RallozarX for pointing out that this does matter, say if they are concentrating on a spell)
Below are some examples I've found arguing that you are a creature within X feet:
There is the sword burst cantrip (SCAG, p. 143):
[...] Each creature within range, other than you, must succeed on a Dexterity saving throw or take 1d6 force damage [...]
Which seems to imply that you do count as "a creature within range".
Then there is the question "Can a character cast Bless on themselves?", and this answer states that "you are always within 30 feet of yourself".
Below are examples I've found arguing that you are not "a creature within X feet":
The Wild Magic Sorcerer's Wild Magic Surge table result on a d100 roll of 95-96:
You and all creatures within 30 feet of you gain vulnerability to piercing damage for the next minute.
This seems to imply that you would not be considered "a creature within 30 feet".
Then there is the ice knife spell (EEPC, p. 19; XGtE, p. 157), which states:
[...] Hit or miss, the shard then explodes. The target and each creature within 5 feet of it must succeed on a Dexterity saving throw or take 2d6 cold damage [...]
This too seems to imply you do not count as "a creature within 5 feet".
There is also the question "Does the target of Lightning Arrow take the secondary damage too?", and this answer quotes the following unofficial tweet by lead rules designer Jeremy Crawford:
The splash damage of lightning arrow affects each creature within 10 ft. of the target, not the target.
Crawford has also said:
If I say, "Each person within 5 feet of me gets a cupcake," an idiomatic reading of that English doesn't lead to me getting a cupcake.
Do you count as "a creature within X feet" of yourself?