“The Nephilim were on the earth in those days, and also afterward”
Keywords; “also afterward”.
If you continue reading in Genesis 6 after these verses you’ll see the context is the days of Noah and the flood.
As per Deut 32 and Ps 82 you’ll see other sons of God who were allotted the nations also rebelled at some stage.
The scriptures are clear that there were Nephilim giants after the flood, and this is why orders were at stages to kill all (man, woman, children and even animals) to eradicate the corrupted seed.
The 1 Enoch and the Book of Giants go into details around the depravity of these Nephilim of mixing seeds and creating hybrids even with animals.