The CPU in that laptop is very likely still faster than a Rasberry PI 5 (and for sure faster than a RPI4).
I would replace the HDD with a SATA SSD drive.
Maybe also see if the DVD drive can be pulled out and replaced with an adapter for another SATA connector.
Edit: the error is a bit cryptic, but the SMART result of the drive actually looks not so bad. But running especially the Nextcloud Postgres database on a SSD will help a lot (I hope you are not using the SQLite option).