In the main text or in furigana?
In the main text, my only suggestion is to look at it relative to the surrounding characters. The small っ won’t quite line up with the other characters, while the big つ should. Other than that, I think it should become easier as you learn more words.
In furigana, they often use つ in place of っ for some reason. It depends on the book, but from my experience this is very common. In this case, you just have to know since you can’t rely on a visual difference. In my experience though, it’s very often the small っ, particularly when the word is two kanji and there are four furigana and the つ is the second character, because that’s just linguistically more common. (e.g. 学校・がっこう)
P.S. The quick or short Language Questions Thread (not grammar) exists for these quick non-grammar questions. [2023] 多読/extensive reading challenge is also a good place to ask about things reading related.