You can plug in the keyword in SEMrush and it’ll tell you how difficult the keyword is to rank for. You can also plug in your competitors’ urls and see what keywords they’re ranking for and optimize your own site for those keywords.
you can just Google “keyword difficulty” to find a lot of information about how to measure it.
I think the most simple and primitive way to find out it is just to search a keyword in Google and see is there any ads for this keyword(the more ads – the more difficult) and how many search results. But for professional work you want to use some tools that give you way more specific information