Snapdragon Spaces supports Unreal Engine 4.27 and as of Snapdragon Spaces version 0.12.1 also 5.0.
Unreal Engine is available via the Epic Games Launcher at Epic Games Launcher | Epic Games Store.
Note that these are the versions the Snapdragon Spaces team is using internally. This means they are tested most frequently and hence most stable. Other versions of Unreal Engine might work but aren't recommended and might come with some unintended side effects.