Welcome to HCM and thanks for your query.
This should be temporary and erection varies with daily stress
and many unpexlained factors.
You need to give more time and meanwhile worrying is only going to make things worse.
Try regular exercise schedule, yoga
and sports and give more time.
Wishing you best sexual health---