First, you should know there isn't a miracle way to improve your aim, so this section is more about letting you know of (good) ways to practice your aim.
These settings are widely used and recommended by Comp TF2 players and the grandfathers of pro gaming. I say recommended because it really comes down to personal preference. Some Comp TF2 players (like kaidus) use different settings. BUT they're here for a reason, in general they should help improve your aim and consistency over time!
sensitivity "x" // (Integer bigger than 0) - this isn't really a recommendation, it's just a part of mouse settings and probably the most important commandm_rawinput "b" // (0/1) 1 recomendedm_customaccel "b" // (0/1) 0 recomendedm_customaccel_exponent "x" // 1m_customaccel_max "b" //m_customaccel_scale "b" //m_filter "b" // (0/1)m_forward "b" //m_mouseaccel1 "x" //m_mouseaccel2 "x" //m_mousespeed "x" //m_pitch "x" //m_side "x" //m_yaw "x" //
There are many ways to find the sensitivity you're more comfortable with, like tracking a fixed spot while moving, at different distances, while you adjust the sensitivity. Here I'll link some guides that I've read/watched and other people suggested. I must point out that, being TF2 an FPS, heavily aiming focused, most "sensitivity guides" for other FPS games should also apply for TF2 (and vice-versa). Although, if you're comming from other FPS games and care for your aim you probably already know this.
Let's get to the guides:
Read/watch and follow those guides and Practice, practice, practice... Do some MGE (My Gaming Edge), DM (DeathMatch), 1vs1/1vs2/1vs3/... Just play, in general. You won't get anywhere if you think you're doing it right, only if you actually DO it right! And the only way to know if you're doing it right is by playing! This might sound like a cliché but after you practice for a while, go practice some more! Jumping (solly and demo) also helped me getting more comfortable moving my mouse and aiming at awkward places, so if you don't jump already, try it out.