If you want to prevent editing posts ever, you can set "Allow post editing" (under Permissions) to "For 10 minutes". It's the only option that stops all edit in time. You can set it down to zero minutes by manually editing the entry in the settings
table in the database.
The issue askvortsov refers to is the option "Until next reply" which is currently buggy on PHP 8.0 and effectively has the same effect as "Indefinitely".
In general we recommend using the latest PHP version possible, but if you are still on PHP 7.x it's fine as well.
If you do need the "Until next reply" option, staying on PHP 7.x means you avoid the bug. But if you don't need that option there is no difference (except PHP 8.0 is probably a tiny bit more performant due to PHP itself being faster)
EDIT: it's probably worth noting that users can only edit posts in a discussion where they can reply, so if you have already prevented users from replying in discussions (through locking or other permissions), they won't be able to edit their posts, whatever the value of "Allow post editing" is.