Need Advice on changing from HR

Hi, I have a MBA (majors - marketing & statergy and IT and minors in HR) from one of the top universities in the country, since it was COVID time when I graduated and the job market was unstable, I took the offer I got in HR in Automobile industry- corporate office in factory set up ( better any job than no job with a education loan over my head)

was Management trainee and got promoted to Assistant Manager in HR, I have had discussion internal with the Head HR about transfers to other departments like IT and Purchase but They don't want to let me go from HR, The interviews I gave inbw these two years did not work out and I lost my confidence in myself, went into depression and I am slowly working out of it by therapy and separating work from my personal life

Now I think it's high time for me to change my job because I can not continue being unhappy, I know I have high potential and I'm underutilised here and not properly paid also

I'm not getting much job interview for non HR roles now as it's been 2 years in HR

The below are two options I think I can do 1. Try getting into HR tech / HR SaaS 2. Just quit, take a break and do some other courses and try to join back the work force. ( Issue is that I got MBA from one of the best colleges, I don't know where else can I study again from )

Please advice on my situation