I use this plugin called Simple Urls https://wordpress.org/plugins/simple-urls/
It is free, easy to use and most importantly it can track the clicks from your clients - so you will know if whoever clicks on your affiliate links :-) Good luck with your affiliate adventure!!!
Here is another solution - https://wordpress.org/plugins/pretty-link/ a free version of a nice plugin with a lot of functionality! :-) It has a premium version which you can find for yourself! Affiliate market is a huge opportunity for everybody who is willing to work for him/herself! Good luck! :;-)
Make sure to ALWAYS add "nofollow" attribute to your affiliate links! You can also create a folder in your root directory which will redirect your affiliate links. There is a special script (search it online) which will redirect your affiliate links (it will be in the above mentioned folder). Also - add the necessary line to prevent search engines to crawl this folder! Add: Disallow: /the name of your folder/ in your robots.txt. Oh, BTW - I have found it! Read this article here - https://yoast.com/cloak-affiliate-links/ and the scrypt is there as well! :-) This in my opinion is the best and most professional solution for hiding/cloaking affiliate links - you will need NO PLUGINS! :-) Cheers,
Here is a video made by me :-) on the topic:https://www.youtube.com/watch?v=3gKGNDCunW8