My advice is 'don't even think about it'.

These days it will be very difficult indeed to actually find anyone to perform a marriage
without a Fiancee Visa or Certificate of Approval to marriage (COA).

If you entered on tourist visa and actually did manage to marry, you must still leave the UK before the visa expires.
Then you would need to apply for a re-entry under a spouse visa.
This spouse application would almost certainly be refused. (no refund on application fee)

It is no fun at all to be refused spouse visa and be forced to continue an expensive and time consuming strategy to stay together.

For what reason?? Avoidance of Visa fees?

Don't forget also, Circumvention of Immigration Rules, Entry Visa Deception, declaration of false information etc etc.

My best guess would be a 5 year ban from entering UK, married or not.

Better to get married in your home country then apply as a spouse through existing procedures.