Will the i5 12400f be good enough

Most certainly yes, but what are you using graphics?