Best macOS for 13 inch MacBook Pro mid 2012
Your question is based on the premise that it is the OS that is causing the slowness. That needs testing, first of all.
If Apple says an OS will run on that Mac, that means it should run fine. (Indeed, one of the reasons they cut off older Macs is because the new OS doesn't run well.)
If you still have the original hard drive, then that's the likeliest cause of slowness, and it should be replaced by an SSD -- to improve reliability, if nothing else. (If you've already done that, then make sure the SSD has at least 20% free space.)
Not enough RAM could also be a factor (combined with swapping onto slow storage media). If you haven't already maxed it to 16 GB, do so.
Or it could be that the slowness is caused by software: things you've installed, possibly for a previous OS, that now don't play well on Catalina. Test booting into Safe Boot Mode (hold down shift at boot), or running in a brand new user account that doesn't have all the Login Items and Launch Agents of your existing account.
The 'best' OS is the one that lets you run the apps that you need, while supporting your hardware. Your MBP won't run Big Sur, so you're already falling into 'legacy' territory. As time marches on, you'll increasingly have to stay on older versions of apps and not keep up with the newest and shiniest.