Hi @ashantip81193483 I'm sorry to hear about the problems you're having. Can you give us a bit more information? I understand you are using Windows (10 or 11?) and this is happening with the latest release of Photoshop 2022 (desktop), which is version 23.3.2. How much installed system RAM does your computer have? 16GB or more? Are you saying that you don't get this error if you revert to Photoshop 2021?
Is your Help > GPU Compatibility panel showing all green checks like this? If not, you'll need to look at the recommended fixes.
You can also check under Edit > Preferences > Performance to see how your settings are configured. You should only let Photoshop use about 70% of your available memory. Under "Use Graphics Processor," in the Advanced Settings, try unchecking GPU compositing. Be sure to close and restart Photoshop after making any changes.
If none of these fixes stop the RAM error you are getting, in Photoshop under Help > System Info, copy the report and post it here for us to review.