A cat's sudden change in temperament and aggressive behavior can be caused by a variety of factors. Here are some possible causes and corresponding suggestions:
Environmental changes: Cats can be very sensitive to changes in their environment. Moving, new furniture, new pets, or changes in family members can all make cats feel anxious. It is recommended to keep the environment stable and give your cat enough time to adjust.
Physical pain or discomfort: Cats may become irritable due to pain or discomfort when they are sick or injured. If you suspect your cat has a health problem, take it to the vet as soon as possible.

Lack of security: Cats may become aggressive because they feel neglected or insecure. It is recommended to spend more time with your cat, interact with it, and give it plenty of love.
Territoriality: Cats are highly territorial and may become aggressive if other cats or animals encroach on their territory. Ensure your cat's territory is secure to avoid unnecessary conflict.