A Primary Source are first hand accounts & materials from the period under examination. These may include:
A secondary source is a descriptive work written about a topic, event, or person after it happened, usually well after it happened.
When secondary sources are written close to the period under examination, it become harder to distinguish between primary and secondary.
Example: is a 2025 book about the 2024 election a secondary source because it's after the fact or primary because it's roughly contemporary?
Another example
I am interested in Librarianship in the mid 18th century. I find a book from 1736 giving the histories of Britain's oldest libraries back to William I (1066) to Elizabeth I (1603):
Is it a primary source?