I got A Hat in Time on Steam and its Pretty laggy, its ok enough for me to play it but it's just not running as smoothly as I see other people play it.
So… this happens to me to. I have a mod that makes it less laggier so get that mod, idk what it’s called, just go find the mod on A Hat in Time Workshop on the Steam App
It's probably your internet speed. The steam version is cloud-based I think. When I have a bad connection the game tends to lag too, I usually get a consistent 60 FPS or higher in a good connection. At least that's what I think, I could be wrong. My solution to this is sacrificing graphics quality for better performance.