Welcome to Android Central! Probably the only way to get a stock keyboard from an older phone (or previous version of a branded keyboard like Gboard) is to find the apk on the web, if available (with the usual caveat about the potential of malware from apk sites, which typically do not vet the files for malware).
Is there a particular feature you want from that old keyboard?