Hi David! My suggestion would be that you spend a bit of time with the software before seeking to add features like this. You will find discourse covers this particular need in a few clever ways when starting a topic. New users get a notice reminding them about community guidelines. Any user posting will get a notice if their topic is similar to another, existing topic.
Ironically, there is a topic about just this already, which you would have found if you had searched before posting.
Edit: just tried this with a new topic containing “search before posting” but the topic I linked to here did not show up in the “your topic is similar to…” popup. But using the full title worked - see screenshot for how it appears.