'Pull your socks up,' at least in the US, would be an antiquated expression. My guess is it's more tied to school uniforms where the student has high socks visible as part of the uniform and not having your socks pulled up is viewed as being sloppy, ill-prepared, lazy, etc. In the US, school uniforms are very rare and have been for some time, especially in public schools.
'Apply yourself' is a very neutral, general, usable expression. It is less idiomatic. Other options are, 'put in the effort,' or 'do the work.'