Nextcloud Memories is an excellent alternative to Google Photos. It is hosted on your own cloud, where you really own your data.
You can cover the following use cases:
- Store the pictures in your own cloud
- Upload new pictures automatically from your mobile phone into your Nextcloud
- Create Albums
- Share photos with users or the public
- Embed Photos or Albums in your blog
- Edit Photos on the mobile or Server via ImageMagick

Also, be aware that Google is using the content of your photos to target you with specific advertisements based on that content.
Just make sure that you have all the prerequisites for Memories installed.
If you are running your Nextcloud Memories on a small server, make sure to adapt some settings for creating smaller preview images, best already before you watch them.
Make sure also that the cron job for creating the preview images is running.
The PHP Imagick extension can be installed based on https://cyberpanel.net/blog/how-to-install-imagick-php-on-linux
If you are running multiple PHP versions on your server, make sure that you are installing the package for the PHP version you are running Nextcloud, and also that you are enabling the PHP module for the correct version via
phpenmod -v 8.3 imagick