can I use previous versions of UE for game development

Yes of course you can use older versions, if you’re referring to generations and not hotfixes. To do that, you’d need to navigate to Epic Store > Unreal Engine > Library, and then click on that arrow button next to the Unreal Engine text and choose the desired version.