The verb wish as in I wish [etc.] can never be followed by a present tense.
I wish I knew his sister. [simple past]
I wish I had known his sister [past perfect] when the accident occurred.
I wish I was/were rich. The verb be can be was or were for third person singular.
I wish I was/were going with you.
I wish I knew what is wrong with you.
Here is a simple rule: Never use a present tense after wish when it is expressing a wish.
If you follow that rule, you will never make a mistake.
The tenses to use are: simple past, past continuous for expressing a wish in the present time
past perfect or past perfect continuous for expressing a wish about the past or with I wished [we had gone.
There are also some modals that can be but let's leave that for another day.
For example:I wish he could have been on time.
The verb wish is an oddity. It is the way it is.
I wish I knew [today] what is wrong [now or today] with my car.
**I wish I knew [today] what was wrong [at some past time] with my car.
Conclusion: They are both correct and each means something different.
Here are many more examples.