That depends on what you're using. If you're using Pydantic, which lets you define a struct-like data type with validation, you can tell it to validate assignments as well [1]. Or you can set the class as frozen and forbid assignment entirely [2].
However, if you mean annotating a local variable with a type, then no, nothing will stop it at runtime. If you use a type checker, though, it will tell you that statically.
The ecosystem also offers other runtime validation options, such as beartype [3]. For example, you can annotate a function such that it always checks the data types of input parameters when called. You can even apply this to a whole module if you want, but I don't think that's commonly done.
[1] https://docs.pydantic.dev/latest/api/config/#pydantic.config...
[2] https://docs.pydantic.dev/latest/api/config/#pydantic.config...
[3] https://beartype.readthedocs.io/en/latest/eli5/