Here is how you can enable line numbers in SSMS.
SSMS Menu Bar >> Tools >> Options >> Text Editor >> Transact-SQL >> General >> Area Settings.
Over here click on the checkbox which is next to Line Numbers and it will start showing the line numbers in SSMS. Personally, I find this feature very convenient and often helps me to remember the changes performed in my queries easily.
Here is the link to my YouTube Channel. If you like what you see, you should subscribe to the channel. If you have any idea on which you want me to create a video, do let me know and I will be happy to create a video on that topic.
Reference: Pinal Dave (https://blog.sqlauthority.com)