No you can definitely patent software. It seems to be a confusing mess as to exactly how you do it and what is patentable, but you can.
https://www.novagraaf.com/en/insights/patentability-software...
> As a result, the widespread belief in the non-patentability of software is simply a misconception, partly as a result of insufficient training of innovators and the lobbying activities of certain interested parties.
https://fsfe.org/activities/swpat/swpat.en.html
> The European Patent Convention states that software is not patentable. But laws are always interpreted by courts, and in this case interpretations of the law differ. So the European Patents Office (EPO) grants software patents by declaring them as "computer implemented inventions".