Memtest86 works in UEFI mode. It has a free variant but is not open-souce.
Download the iso from https://www.memtest86.com/tech_booting-cd-dvd.html
Burn it to usb drive (I used etcher).
Now restart your machine and boot from the usb drive.
Diagnosing RAM with tools most of the time do not work. I ran Memtest86 for 5/6 hours. It reported that the RAMs do not have any issues. Then I took out the RAMs i doubted and the system started running smoothly.
Just keep one RAM and remove others. Then run your machine for a while and check if there is any issue or not (remember, the issues can be very subtle, for example keyboard does not work for 1-5 seconds every once in a while). If there is no issue then it is a good RAM. Then check ram 2,3...n.
Again if you find a faulty RAM, then maybe the RAM is not fault but the slot where it is attached.
Please note that all RAMs and slots can be good but if there is a miss match (bus speed or brand) then it can cause issues. So, you have to make sure that combinations also work. For example, use same brand and same bus speed RAMs together and test the machine for a while (remember, the issues can be very subtle). Then attach another brand / bus speed RAM and test for a while. Then maybe enable XMP and test for a while.
So, hopefully now you understand why it is better to diagnose RAMs physically than with tools.