You can’t have UPROPERTY of just any type, only those that are supported explicitly by the engine (int, bool, float, etc) and those that use the various engine macros (USTRUCT , UCLASS, etc).
size_t is neither. If you want a UPROPERTY, you’ll have to choose from something more explicit like int, int32, int64, uint32, etc.