Category "fgets"

is there a way to use fgets size dynamically

So im learning about pointers and dynamic memory and how am experimenting with fgets. So i want to take in a string input into a pointer using fgets, but i want

why does malloc not taking in the full text? [duplicate]

Why is it when I try to take in a text in the variable is does not store in the full sentence. The malloc seems to not allocate enough memory