Library catalogs and some databases will provide subheadings to indicate that the item in a primary source.
For people, search a person’s name by author, not by subject. If you search by subject, you will find works about them, which is likely going to be a secondary source. If you search by author, you will find works by them, which are more likely to be primary sources!
For events, search by subject then look for subheadings in your search that say things such as:
Check the publication date. If it was published during the time of the event, it is probably a primary source.
Think about how the author/creator knows the information. If they were there or witnessed the event, it is a primary source.