Player handles intent, DM handles rules
In short, follow the spirit of the general mechanism behind all of D&D:
The DM describes the environment.
The players describe what they want to do.
The DM narrates the results of the adventurers’ actions.
(headings from the Player's Handbook: How To Play)
So, have the player describe what they want the spell to do, in in-world terms, and then, as the DM, determine a mechanical representation for it.
The more usual way to handle this is to allow the player to describe the spell's effects and select the level that they want the new spell to be, and as DM, decide on the damage dice, saving throws, etc. based on what is appropriate for that level.
In some cases, the player may ask for the spell to do more damage (or last longer, or some other power-related change), in which case you can offer to allow that change if the spell's level changes (as deemed appropriate by the DM) to represent its new power level.
Basically, the player describes the effect, and can then choose either the damage range or the spell level, but not both.
Be ready to adjust
If, at a later date, the DM feels that the spell is not balanced compared to similar spells at similar levels (either too strong, or too weak) then a similar mechanism can be used to correct it: simply ask the player if they'd like to keep the damage and change the spell level to match, or keep the spell at its current level and adjust the damage to be more suitable. This also applies if it's the duration or some other part of the spell that needs adjusting.
When designing the mechanics of a spell, look at existing ones first. If you can change the descriptive text and keep the numbers the same, then do that. If not, then re-using phrases and sentences from other spells is often a good idea - consistency makes it easier to remember, using tried and tested wording makes it less likely that you'll introduce unintended behaviour. Remember to check the Errata and Sage Advice to see if the spells you're copying from have been amended since publication.
It's not all about the numbers
If you aren't modifying an existing spell (or you are, but you're changing its level), use the spell damage table on p283 of the Dungeon Master's Guide as a starting point, but don't be afraid to deviate from it as needed. Looking at the existing spells, you'll see that almost all of the cantrips that deal damage deal less than the table suggests they should, while some spells deal more than recommended (famously, fireball deals 8d6 at a level where that table suggests 6d6). A lot of these deviations were introduced during playtesting. A few rules of thumb:
- A spell that imposes an effect besides just damage will usually do a bit less damage, especially if that effect makes the target more likely to take damage in future (eg. paralysis). A spell that imposes a particularly nasty status effect might do no damage at all unless it's very high level (eg. hold person)
- A spell that deals damage of a type that many creatures are resistant or immune to (such as fire) or targets a saving throw that creatures are often quite good at (such as Dexterity) might do more damage to balance out the fact that it will often be reduced or negated
- A spell that deals damage of a type that very few creatures are resistant or immune to (such as psychic) or targets a saving throw that creatures are often quite bad at (such as Charisma) might do less damage to balance out the fact that this spell will deal damage more reliably