The hardware memory within iPhones is not upgradable.
The best that you will be able to do is to manage the use of the memory that you have by removing content and apps that is not critical to have on the device, or offloading some of the leaa critical apps/content to iCloud.
This article is mainly about checking storage use, but also includes some links to articles about optimisation at its end.
How to check the storage on your iPhone, iPad, and iPod touch - Apple Support