It’s hard to know or remember all the “rules” of photography. One big rule is the “rule of thirds,” followed closely by the rule of “remove the lens cap”.
There are also lesser known rules, such as the rule of 500. The rule of 500 dictates how long a night sky exposure can last before star trails form on a full frame camera. For example, taking a night sky picture using a 50 mm lens, divide 500 by 50mm and the answer is ten. Ten is the maximum amount of exposure, in seconds, before star trails form. With a 500mm lens expose for 1 second or less, or trails will be present. On a 22mm lens, 22.7 would be the maximum length of exposure for sharp stars.
For a crop body, like the Canon M5, you need to multiply the lens factor by the 1.6 sensor crop factor. Since a 22mm lens on the Canon M5 is effectively a 35.2mm lens, it needs (500/(22×1.6))=14 seconds or less of exposure for no star trails.
For further thought, you might check out Lonelyspeck.com. They have an interesting article on setting ISO for Astrophotography.