Hello 4094347496:
Your question asks generally for the 'difference' between ANSI150 and 300 classifications, and then seemingly you want to know the difference between flanges (and building lengt?, topwork? other?).
I presume, as often is for 'open' questions, that there is a specifc problem causing you to ask the question. Perhaps you want to know if a specific valve, for a specific process, can be substituted with one of the different class, or if you should select the one or the other class for a specific application, etc. etc.
If you want more precise and detailed advice it is always a good idea to give as many details as possible.
This is, after all, as zdas04 says, a forum with a large number of specialists.