Yes, you can use both. Both mean "nearby". Keep in mind that when you say "Ik woon dicht bij mijn ouders" (I live near my parents), the word "dichtbij" is splitted, because what "vlak bij" belongs to (that is "mijn ouders") is behind "vlak bij". If that is not the case (with words like "vlak bij", "dicht bij", "midden in (in the middle of)), the word is not splitted. If you are able to read it, here is the source: https://onzetaal.nl/taaladvies/advies/vlakbij-vlak-bij
According to the dictionary vlakbij is a bit closer, but personally I just treat them as synonyms.
Ok so i spelt wonen wrong... i spelt is as wonnen... does the meaning change that much from the typo....?