I do this with a text expansion tool called espanso
espanso - Cross-platform Text Expander written in Rust
it’s not the easiest to use, but it’s Free Open Source.
There are definitely easier paid alternatives though
Just to give you an example whenever I write
;date
it’s transforms into the current date
2021-04-02
when i write
;time
it gives me this
2021-04-02 14:30
That’s the formats I like but you can change it to whatever you like, it’s just a bit tricky to figure out.
I use espanso on Linux and Mac and I’m sure it works on windows as well