I was in my garden when I noticed a weed that I’d never seen before. I looked on the internet and maybe it’s a nightshade??? The inside of the fruit had lots of tiny seeds that reminded me of pomegranate seeds. It has white flowers with five points that are yellow on the inside. Anyway, I hope someone can identify it. Thanks.
It might be Solanum nigrum, common name black nightshade, though the single leaf you show looks a little narrow. Anecdotally, it is thought to be highly toxic, but how poisonous it actually is is not entirely clear, see here https://pfaf.org/user/plant.aspx?LatinName=Solanum+nigrum. It is neither woody nightshade (Solanum dulcamara) nor deadly nightshade (Atropa belladonna), both of which are toxic; of the two, Atropa is the most toxic.