I tried using a previous version of Ubuntu kernel as suggested by jeromeoneil
The kernel version that I was using that caused system freezing was 5.19.0-43-generic.
So I installed a previous version 5.19.0-41-generic.
I used grub to boot using the older kernel version.
The result.
Well not only did it not solve the freezing problem but now there is no audio.
For Ubuntu, using an older version of Ubuntu does not work!