“...does that mean you should change denominations periodically as you find the church you are part of having doctrines that are not in line with the Bible...”
How do you know it’s “the church you are part of having doctrines that are not in line with the Bible” and not you? How are you sure you haven’t become like a false prophet because you came to disagree with the doctrines of said church of which you were a part?
It is part of growth to make mistakes. In my view, a denomination is a temporary stopover. As you grow in knowledge, you will inevitably outgrow your church because most churches are stagnant in their growth.