So, if frequency(max) of light emitted from an object proportional to temperature in kelvin, how can sun have max frequency around the yellow region while blue flames are much less hot?
Do you mean blue flame like that produced by a Bunsen burner (or a gas stove)?
The reason is that flames in general are not black body radiators. The colour of a flame is determined by the type of chemical reactions occurring when the given type of fuel is burning.
Conversely, radiators which can be approximated as black bodies, e.g. stars, or hot pieces of metal, get bluer with higher temperature.
(0, B stars are blue, e.g. Rigel)
So, if frequency(max) of light emitted from an object proportional to temperature in kelvin, how can sun have max frequency around the yellow region while blue flames are much less hot?