Rule of 500. Divide your lens focal length into 500. That's the longest exposure to avoid trails. 500 / 24mm = ~21s so your example would be 500 / 50mm = 10s.
Some random search result:
https://astrobackyard.com/the-500-rule/