Amos 7:14 Amos answered Amaziah, "I was neither a prophet nor the son of a prophet, but I was a shepherd, and I also took care of sycamore-fig trees.
NIV 1 Kings 20:35
Meanwhile, by the word of the LORD, one of the sons of the prophets said to his companion, "Strike me, please!" But the man refused to strike him.
To the extent that it was an occupation like carpenters and goldsmiths, fathers taught their sons how to become a prophet.
Ellicott's Commentary for English Readers
(14) I was . . .--An interesting biographical touch. Prophecy, like other occupations, tended to form a hereditary guild, but Amos was not by birth a prophet.
Obviously, it was not necessarily a hereditary thing because Amos' father wasn't a prophet and there was no guarantee that the son of a prophet would automatically become a prophet either just like other professions.
There are plenty of examples on both sides:
Prophets were very rarely sons of Prophets
The following prophets were not descended or prodigy of prophets: Abraham, Moses, Samuel, Isaiah, Jeremiah, Ezekiel, Daniel, David, Paul, Peter, Agabus, Amos, etc. (There are many more.)
Prophets very rarely had children who were Prophets
The prophet Samuel had children who were wicked and not prophets. These prophets did NOT have prophet children: Isaiah, Jeremiah, Ezekiel, Peter, Solomon, etc.
A few prophets did have prophet sons
Abraham was the father of Isaac and the grandfather of Jacob. David was the father of Solomon. Others may be able to think of more. The reference in 1 Kings 20:35, "sons of the prophets", is almost certainly to those who were PUPILS of the schools of the prophets - Samuel's ancient attempt at religious education system in Israel.
Thus, Amos was able to answer (in Amos 7:14) that he had no qualification to be a prophet, - he was a farmer and had no education in the schools of the prophets and was not even the child of a prophet. He was chosen by God, as was the case for all prophets.