If you google "can Keppra cause impotence" or "can seizure medication cause erectile dysfunction", there are a lot of results on epilepsy forums that seems to indicate that yes, it can cause this. It's mostly patients reporting the problem on other forums.
I did find this - https://www.futuremedicine.com/doi/10.2217/fnl-2019-0028
Also this - https://www.epilepsy.com/stories/changes-sexual-desire Epilepsy can also cause this.
Talk to your neurologist. Read the stories from other men to see what they've done. Also, see a urologist and rule out any other physical problems that might be causing this. It might be coincidence.
Let us know how you are, and what they find. Good luck. :)