Moodle 5.1 is released on the 6th October 2025. Amongst other features, the layout of the code has changed from previous versions. Some web server configuration changes WILL be needed and your previous upgrade methods may need some adjustment.
It is important that you read - https://docs.moodle.org/501/en/Upgrading , especially the section "Possible issues that may effect you in 5.1".
Detailed information about code restructure is here (probably also a required read) - https://moodledev.io/docs/5.1/guides/restructure
As usual, you should also read the Release Notes for Moodle 5.1 to check your system is fully compatible - https://moodledev.io/general/releases/5.1
Always take a full backup of your Moodle site before attempting an upgrade.