Show examples of public dataset in master thesis
In principle it depends on the permissions given to you by the owners of the data. Any open source licence would give you permission to share elements of the dataset with attribution (though I am not a lawyer). If it's listed on GitHub there's usually a licence shown on the repository's main page (see screenshot). If not, you can contact the authors to ask them to be 100% above board.

A screenshot of a GitHub repository header

Copying a figure from a paper might be somewhat shakier, as the publisher may own the rights to images as published in the final version. Your country may have "fair use" or "fair dealing" exemptions from copyright requirements for educational uses of certain materials, but it could be complicated to ensure you are following these rules. A university librarian may be able to help you further.

In practice, I think it's very unlikely that there would be a problem with what you're planning to do.