Next, graduate-level courses are typically an introduction to the topics necessary to do research within a field. For example, while an undergraduate-level operating systems class covers the basic workings of operating systems, graduate-level courses tend to cover fundamental papers, alternative approaches, and cutting-edge research. I once took a graduate level course on type theory. It was an excellent foundation for pursuing research in type theory.
It also helps to read recent proceedings from relevant conferences and journals to see what the pressing problems are in the field and to learn more about the state of the art.
Once you’ve identified some areas of interest, I’d find a thesis advisor who most aligns with the topic you’re interested in. That advisor will provide more input and will also make suggestions.
Good luck!