What is the newest macOS my iMac can run?

i have a late 2015 iMac 21,5 inch with 1tb Fusion drive and 8 gigs of ram with a 1.6 gh Core i5 processor. It's currently on Big Sur and im looking to update it to either sonoma or seqouia.

I've tried seqouia but the imac couldnt run it and crashed, since then ive bought an external ssd drive and a 256 gb usb stick to make it maybe run faster.

Should i update to sonoma or seqouia?

Author: @ArmanMEMEmaker