in iOS the UI thread is split from the rest of the compute, and runs at elevated priority if i recall correctly. this used to not be the same case for android. having said that, my android devices run just fine as long as they have plenty of ram. so, if you buy a flagship samsung it usually comes with 12gb ram. the current minimum I’d say is 8gb. used to have the pixel 4xl with 6gb which kept lagging… how the situation develops in 2 to 3 years and if 12gb is still enough remains to be seen. in general apple is better with long-term device support (up to 5 years). all this is of course very subjective and depends on ur usage and if u game a lot on ur device.
I’m not certain, but given that I’ve not seen a lot of UI lag in recent android releases I believe they must have fixed it.