How to implement 410 error status code

Hello, I would like to redirect all strange url’s on my website https://marinabaltyk.pl/ URL path is like:

  • lyta-306325oitems/etidm/,
  • htwy-210403gitems/eti/,

How can I implement 410 to all this strange URLs? These urls are from probably from previous CMS.