Well, I forgot that i made this help question.
I will give you what I found about it.
There are ways to make them work together but it doesn't make fps better.
It actually makes it worse.
I will talk about my nether piglin farm
Normal MC: 40 FPS at max
Optifine: 60 FPS at max
Sodium: 75 FPS at max
Optifine + Sodium: 25 FPS at max
You see, it makes it worse than normal.
If you want to try it there is a fabric mod that works as a bridge between sodium and optifine. (Don't remember the name)
I tried this at 1.16.5 you can go and try as well.