No, a wish spell does not just give you another spell slot but it can
As quoted, the part of the wish spell that duplicates spells reads (emphasis mine):
The basic use of this spell is to duplicate any other spell of 8th level or lower. You don't need to meet any requirements in that spell, including costly components. The spell simply takes effect.
This means that the wish spell has some useful advantages:
- You can use any spell, so also spells you don't know, haven't
prepared, are not on your spell list, etc.
- You do not have to meet time requirements, meaning ritual spells can
be done in an action.
- You do not have a range limit.
- You do not have to have costly material components, especially ones
that would normally be consumed. Heroes' feast for free, anyone?
But there is a way to get extra spell slots from wish as the rest of the text is:
Alternatively, you can create one of the following effects of your choice:
- [list of nice relatively simple effects]
You might be able to achieve something beyond the scope of the above examples. State your wish to the GM as precisely as possible. The GM has great latitude in ruling what occurs in such an instance; the greater the wish, the greater the likelihood that something goes wrong. This spell might simply fail, the effect you desire might only be partly achieved, or you might suffer some unforeseen consequence as a result of how you worded the wish. For example, wishing that a villain were dead might propel you forward in time to a period when that villain is no longer alive, effectively removing you from the game. Similarly, wishing for a legendary magic item or artifact might instantly transport you to the presence of the item's current owner.
This means you can wish to get a number of extra permanent spell slots. You DM will probably limit that number/lvl but you can ask.
You will also suffer some side effects for any wish that doesn't just duplicate a lower-level spell:
The stress of casting this spell to produce any effect other than duplicating another spell weakens you. After enduring that stress,
each time you cast a spell until you finish a long rest, you take 1d10 necrotic damage per level of that spell. This damage can't be reduced or prevented in any way.
In addition, your Strength drops to 3, if it isn't 3 or lower already, for 2d4 days. For each of those days that you spend resting and doing nothing more than light activity, your remaining recovery time decreases by 2 days.
Finally, there is a 33 percent chance that you are unable to cast wish ever again if you suffer this stress.