If you never intended to have such urls in your site and they truly mean nothing for you, then it's better to keep serving them as a 404 - a page that is not found - not existing in the site.
Use redirects if you used to have a page with important content, indexed and present in SERPs, that brings a lot of traffic to your site.
In the 404 section of Google Webmasters you can read for the 404 urls:
Googlebot couldn't crawl this URL because it points to a non-existent
page. Generally, 404s don't harm your site's performance in search,
but you can use them to help improve the user experience.
And the 404 read more in Google Support:
Generally, 404 errors don’t impact your site’s ranking in Google, and
you can safely ignore them. Typically, they are caused by typos,
misconfigurations (for example, for links that are automatically
generated by a content management system) or by Google’s increased
efforts to recognize and crawl links in embedded content such as
... 404s are a perfectly normal (and in many ways desirable) part of the
web. You will likely never be able to control every link to your site,
or resolve every 404 error listed in Search Console. Instead, check
the top-ranking issues, fix those if possible, and then move on.
Generally you can't handle/redirect all possible 404's, it's impossible. Anyone may arrive at a page and type any url.
So make sure you have under your control things like above, using robots.txt, noindex, your content maintained and cleaned up, your software up to date, and use Google Webmaster Tools to monitor and manipulate as possible it is the google bot.
And as @closetnoc has noted with his comments, consider reviewing your website's health against being hacked - as if you are discovering many such urls this can be a signal.