How do I know that God is speaking to me?

That is a really good question!
There is only one way I know that God is speaking to me: that is, if I am reading the Holy Bible. That is the only way God has spoken to us since the Apostle John wrote the end of the book of Revelation.

If you want to HEAR God out loud with your ears, read it aloud, or if you can, listen to an audio recording on any one of many apps of the Bible.

This is not a flippant answer on my part. I gained this after many long years of suffering because of people who claimed I should be able to somehow take the thoughts in my head and attribute them to God.

I agree with the answer above that you know God is speaking to you when you are reading the Holy Bible.
My Sunday school teacher always used to say that God would never tell you to think, say or act in a way that was not in line with his Holy word. It is important that we live in confidence that God is speaking to us as Christians. The only way to do this is by reading his word and keeping it in our hearts.

Hi there! For me, I know God is speaking to me whenever I read the Bible and whenever I make choices in life or encounter challenges. With simple problems I have in life, the fact that I did not let it frustrate me that much, I know God spoke to me and asked me to trust His plans for me. With the daily challenges I encounter, I know God is with me telling me that everything will be fine, I just need to trust Him. The Lord God speaks to us all the time, it is on us if we listen to Him.